May 10, 200818 yr I just finished building my unraid array and am having a huge issue with getting acceptable read performance with linux clients. Windows machines access the shares just fine and with decent speed, but linux clients seem to hang. I was able to recreate this with FC6, ubuntu, and and I even tried a self compiled mount.smbfs to see if it was a cifs thing. When I attempt to do simple operations such as getting a directory listing on a directory in one of my mounted shares, the server takes almost exactly 60 seconds to respond. Looking at the server logs on the unraid server, the time stamps show suspicious hangs of exactly 20 seconds between activity in producing a single directory listing. I have the exact same results on disk shares and user shares. Is anyone else experiencing the same? How do I fix this? Here are some log excerpts: Begin ls of /mnt/user/Music/FLAC/Wilco/Summerteeth [2008/05/10 12:11:50, 3] smbd/process.c:process_smb(1068) Transaction 6 of length 124 [2008/05/10 12:11:50, 3] smbd/process.c:switch_message(926) switch message SMBtrans2 (pid 4280) conn 0x803f4108 [2008/05/10 12:11:50, 3] smbd/sec_ctx.c:set_sec_ctx(241) setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0 [2008/05/10 12:11:50, 3] smbd/trans2.c:call_trans2qfilepathinfo(3252) call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 263 --- 20 seconds of nothing -- [2008/05/10 12:12:08, 3] smbd/oplock.c:init_oplocks(863) init_oplocks: initializing messages. ......bunch of messages indicating re-establishing the connection and checking a bunch of permissions [2008/05/10 12:12:08, 3] smbd/trans2.c:call_trans2qfilepathinfo(3252) call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = 263 -- 20 more seconds of nothing --- [2008/05/10 12:12:28, 3] smbd/trans2.c:call_trans2qfilepathinfo(3314) call_trans2qfilepathinfo FLAC/Wilco/Summerteeth (fnum = -1) level=263 call=5 t otal_data=0 [2008/05/10 12:12:28, 3] smbd/process.c:process_smb(1068) Transaction 4 of length 134 [2008/05/10 12:12:28, 3] smbd/process.c:switch_message(926) switch message SMBtrans2 (pid 4341) conn 0x803f18b0 [2008/05/10 12:12:28, 3] smbd/trans2.c:call_trans2findfirst(1703) call_trans2findfirst: dirtype = 17, maxentries = 150, close_after_first=0, clo se_if_end = 2 requires_resume_key = 4 level = 0x101, max_data_bytes = 16384 --- yet another 20 seconds of nothing --- [2008/05/10 12:12:48, 3] smbd/dir.c:dptr_create(515) creating new dirptr 256 for path FLAC/Wilco/Summerteeth, expect_close = 1 ... and the ls command finally returns a directory listing
May 11, 200818 yr Author Ok, I discovered the issue... unraid server enables DFS by default. Linux mount.cifs and mount.smbfs do not support DFS shares properly. Thus, the delays are a result of the server attempting to reformat a DFS share for a legacy client. Disabling DFS and restarting samba on the server resolved the issue. Why is DFS enabled? If all my files are on the unraid severs, I'm unclear as to what advantage it has for me with the windows clients.
May 15, 200818 yr I would also like to know the answer to this. The shares I have setup and access on my linux box are extremely slow. I am mounting with the following in /etc/fstab //192.168.15.103/disk1 /fatty/disk1 cifs user=blah,pass=blah,rw,users 0 0 When I download files to the share, I notice I can get about 200kB/s.. yuck. should I be mounting a different way or should I disable DFS?
May 15, 200818 yr Author This is what I changed. On the unraid server, in /etc/samba/smb.conf, in section [global] # misc host msdfs = No msdfs root = No Then issue a /etc/rc.d/rc.samba restart to restart samba and have it enable the new config. Of course this setting will reverse itself each time the machine is rebooted since /etc is in ram. After that change I could mount unraid samba shares in linux and access them with the same performance as windows clients. Write speeds are now limited by the pci bus in the unraid server (maxes at about 80Mbps instead of the theoretical 133Mbps since both my gigabit card and sata controllers are pci).
July 9, 200817 yr Added to Improving unRAID Performance, as a link back. Feel free to add to, correct, or expand. Would like to see more discussion here, and a more complete set of instructions for other users.
July 9, 200817 yr Would like to see more discussion here, and a more complete set of instructions for other users. Thanks, I'm trying to figure out how to make these changes persistent through unRAID reboots. I thought it was as simple as modifying the unRAID flash /config/go file (and probably wrongly assumed etk29321 didn't know about that mechanism) but that doesn't seem to be working for me. I posted about my experiments with this here http://lime-technology.com/forum/index.php?topic=2215.0
July 9, 200817 yr Put a line similar to this in your "go" script sed -i -e "s/host msdfs = Yes/host msdfs = No/" -e "s/msdfs root = Yes/msdfs root = No/" /etc/samba/smb.conf It uses the stream editor to edit the smb.conf file in place, substituting text in two places. Joe L.
July 9, 200817 yr Oh yes, you might also need a line to execute the smbcontrol command to re-read the configuration. Otherwise, the samba daemon is already started and will have the older config. The two lines added to the "go" script would then look like this: sed -i -e "s/host msdfs = Yes/host msdfs = No/" -e "s/msdfs root = Yes/msdfs root = No/" /etc/samba/smb.conf smbcontrol smbd reload-config Joe L.
July 9, 200817 yr Put a line similar to this in your "go" script sed -i -e "s/host msdfs = Yes/host msdfs = No/" -e "s/msdfs root = Yes/msdfs root = No/" /etc/samba/smb.conf It uses the stream editor to edit the smb.conf file in place, substituting text in two places. Joe L. Thanks Joe, that looks like the best way to do it. I posted about this in my aforementioned thread but it also seems to work echoing a '[global]' line before the others in the 'go' script, creating a second [global] section in the /etc/samba/smb.conf file
July 11, 200817 yr Author This is the hard way to do it, but here's what I ended up doing: 1) shutdown unraid server 2) move the flash drive to my linux box and mount 3) copy bzroot from flash drive to my linux box 4) uncompress bzroot: zcat bzroot | cpio -i -d -H newc --no-absolute-filenames 5) moved bzroot file out of the way (ie mv bzroot ..) 6) made edits to /etc/samba/smb.conf: # misc host msdfs = No msdfs root = No 6a) do anything else you want to do that needs to remain persistent across reboots here 7) recompress bzroot: find . | cpio -o -H newc | gzip > bzroot 8 ) copy new bzroot to flash drive 9) stick the flashdrive back in the unraid server and boot That'll permanently edit the config file.
May 4, 200917 yr wow, wish i would have seen this sooner. just added these lines to my go script and rebooted. suddenly transfer speeds are around 4x faster on my ubuntu 9.04 box. awesome!
Archived
This topic is now archived and is closed to further replies.