Samba smb hangs, disconnects, then is good again.

Status
Not open for further replies.

BitsnBytes

Cadet
Joined
Jul 24, 2018
Messages
1
Hey there, first post!

Searched for smb samba and hangs, couldn't find anything regarding this.

First off, hardware!
HP N40L using a USB hub powering if I recall (not at home now) 5 external drives in a Raid6 fashion sporting zfs, 16gb of ECC memory, booting from an internal SSD drive, on a apc ups, hmmm not sure what else to include...

Second, background.
I know tsk-tsk they aren't Red drives (much more expensive) but for the price and what I need it for it would be perfect for the occasional need for a couple directories from the 30,000+ directories w/some redundancy built in (I do use an online service for backup). Spanning drives would be a lot easier but I do want the ability to swap a drive out and not have to restore an entire 20tb of data.

Third, issue.
So all went pretty well, aside from an occasional checksum error on both the array as well as the boot array. Repaired both of those, no errors after changing the usb hub and scrubbing.

So the problem that I now have is when transferring files, it goes fine for say a minute, then it'll hang on a single file, then timeout saying something to the extent of 'the network can no longer be found retry skip, cancel' screen in windows.
I've got some experience with linux so feel free to ask me to post a log but after monitoring 'tail -f /var/log/messages' it doesn't display anything all that useful. Is there another log or command I should try before trying to transfer a folder over to see what exactly is causing the issue?

Thanks for reading this any help would be truly appreciated!
 

fsfsfs

Dabbler
Joined
Feb 5, 2018
Messages
24
Do you have the problem only when writing files, or also when reading from the array?

Another test would be: Does it also happen when you not use samba, but another protocol?

I would guess your hangs are syncs from RAM/buffer to your drives. When you write to the NAS, you first write to RAM, and after a while that will be flushed to the array. The samba process will be blocked waiting for IO to finish.

So hardware setup/OS issue, not samba issue I'd guess? Apart from that, I wish you lots of luck with the USB drives! I always had issues without end using USB drives, mostly random disconnects of the drives :/
 
Last edited:

fsfsfs

Dabbler
Joined
Feb 5, 2018
Messages
24
Maybe you can shorten that write-out interval in FreeBSD?

I found sth here: https://wiki.freebsd.org/ZFSTuningGuide#General_Tuning

Loader tunables (in /boot/loader.conf):

Code:
# Decrease ZFS txg timeout value from 30 (default) to 5 seconds.  This
# should increase throughput and decrease the "bursty" stalls that
# happen during immense I/O with ZFS.
# http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007343.html
# http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007355.html
# default in FreeBSD since ZFS v28
vfs.zfs.txg.timeout="5"
 
Status
Not open for further replies.
Top