ubuntu to ubuntu file sharing
Preston Hagar
prestonh at gmail.com
Thu Dec 3 20:09:05 UTC 2009
On Wed, Dec 2, 2009 at 10:19 AM, Alan McKay <alan.mckay at gmail.com> wrote:
>
> Yup, doesn't get a lot simpler than that. Why would someone choose
> not to do this? Really beyond me why they would not.
>
Just an extra data point in the NFS vs Samba debate, if you are going
to be using a mixed environment (i.e. the same files are going to be
shared to Windows machines via Samba and *nix machines via NFS), you
must turn oplocks off in your Samba config:
UNIX or NFS Client-Accessed Files
Local UNIX and NFS clients access files without a mandatory
file-locking mechanism. Thus, these client platforms are incapable of
initiating an oplock break request from the server to a Windows client
that has a file cached. Local UNIX or NFS file access can therefore
write to a file that has been cached by a Windows client, which
exposes the file to likely data corruption.
If files are shared between Windows clients and either local UNIX or
NFS users, turn oplocks off.
(copied from here:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2615920)
If you don't, then you can easily get data corruption if a Windows
machine opens a file, then a *nix machine opens and saves the same
file, then the Windows machine closes and saves the file. The Windows
machine will think that no one has opened the file or changed it while
it had it open and will likely lose any data from the NFS edit and can
possibly corrupt the file altogether. In a home network, with just
one or two people, this is probably less likely to happen, but in any
sizable environment, can happen easily.
In general, it has been my experience that NFS (especially NFS v4) is
significantly faster and more reliable for sharing data from a *nix to
*nix machine. That said, I have gone with Samba before due to
potential locking issues.
To the OP:
>From the command line, try entering:
smbclient -L \\<ip_address_of_samba_server>
where <ip_address_of_samba_server> is replaced by the ip address of
your samba server. If you are using username and passwords to
authenticate, you may need to add -U <username> and then you will be
prompted for your password.
If the command works, you should get a list of shares on your server.
If you do, you then should (hopefully) be able to mount the share you
need and access it. You can even put it in your fstab to be mounted
at startup.
Take a look at this guide:
http://tldp.org/HOWTO/SMB-HOWTO-8.html
and see if it gets you any further. It has been my experience that
samba access through the Linux gui is flakey at best (just my
experience, I don't intend to start any kind of flame war). Even if
you don't usually use the command line, your best bet might be to
fight through it using the guide above and this list to just get your
samba shares mounted via the command line. Then you will be able to
access them in the GUI file manager and it should work well.
Preston
More information about the ubuntu-users
mailing list