8

I'm sorry if this is a repeat post, seems my first attempt failed...

A little context first.

Firstly, I have inherited one of the classic networks from hell. Amongst a number of other things, I discovered that the majority of the clients data, including a heap of compliance data, is currently stored on one up USB drives being shared via Samba to the rest of the clients (and not being backed up).

To help me sleep at night, I've thrown together a linux files server with two raid 5 arrays to put this data on, and to avoid having to remap all of the client machines thought it should be OK to unmount the USB disks, after rsyncing the data to the file serve, and nfs mounting the new mount points in their place.

This seemed to work Ok with some quick testing, however, today I discovered that my users are having terribly trouble opening files across this arrangement with the file transfer rate being very very slow.

I don't see any problem with direct nfs mounting of the disks (from my linux box) but via the samba shares it is totally unusable.

I did use the default setting in both export and mount points no will play tonight with some of the options I have found on google, but am thinking I'll have to roll back for tomorrow at least.

Should I be able to do this? I can't see why not, as I'd guess it would be the sort of thing that would be done for a NAS system anyway.

Any advice? Please?

1

3 Answers 3

4

nfs mount option nolock worked for me.

edit: you can add the 'nolock' to mount options in fstab, or 'mount -o nolock,remount /mount_path' to mount it on demand. I had an issue with samba creating a mount on an nfs volume and it created infinite open connections until I added this mount option.

3

The Samba manual mentions that re-exporting a NFS mountpoint over Samba does not work correctly. NFS is not 100% POSIX compatible, so some things work differently than what Samba expects.

I.e. you should run Samba on the same server where you run the NFS service, exporting the local disks directly.

2
  • 1
    where in the docs is this? I'd really like to find it, myself :)
    – warren
    Apr 22, 2010 at 20:56
  • So basically as long as both Samba and NFS are running on the same server it isn't a problem? Jan 29, 2020 at 23:04
2

Did you add the tuning fix to smb.conf?:

socket options = TCP_NODELAY IPTOS_LOWDELAY

The SAMBA howto gives more options and explanations: http://us1.samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html

The socket option TCP_NODELAY is the one that seems to make the biggest single difference for most networks. Many people report that adding socket options = TCP_NODELAY doubles the read performance of a Samba drive. The best explanation I have seen for this is that the Microsoft TCP/IP stack is slow in sending TCP ACKs.

4
  • Thankyou so much for this.. I'll try it now and see what happens.. and report back. Peter.
    – Peter Nunn
    Sep 24, 2009 at 21:37
  • Bugger.. its already set. The odd thing is the speed of the usb mounted disks is quite good.. I just would have assumed the nfs mounts would have been fast too.. (well, guess they are if not going through samba first). The mount I'm using (from fstab) is 192.168.20.63:/home/onenergy2 /home/onenergy2 nfs rw,rsize=32768,wsize=32768,hard,intr,nfsvers=3,tcp,noatime,nodev,async,lock 0 0 for what its worth. Peter.
    – Peter Nunn
    Sep 24, 2009 at 21:44
  • If, as it looks, I have to mount the shares directly on this second box as samba shares, a suplimentary question if I may.. .. what's the best way to push the users credentials across to this machine. Can I use the first machine (set as a domain controller) to authenticate the users on the shares on the new file server or do I need to copy the credentials between machines (yuck)? What do people suggest? This must be a fairly common issue for network storage I'm guessing. Thanks again. Peter.
    – Peter Nunn
    Sep 24, 2009 at 21:46
  • If you're looking at keeping credentials synchronized, you'll need to look into some sort of centralized authentication such as OpenLDAP or Samba PDC. I would suggest Samba PDC if you can: us5.samba.org/samba/docs/man/Samba-HOWTO-Collection/…, because it will support single sign-on which is a very nice feature to have.
    – churnd
    Sep 29, 2009 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .