Find the answer to your Linux question:
Results 1 to 8 of 8
Is there any way to adjust the timeout for mounting/unmounting a share using Samba? It seems like it's way too long right now....a few minutes?? occassionally (not very often), a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586

    Adjust timeout with Samba?


    Is there any way to adjust the timeout for mounting/unmounting a share using Samba?

    It seems like it's way too long right now....a few minutes??

    occassionally (not very often), a linux client will try restarting and will stop while restarting when trying to unmount a network filesystem (the home server share) and will just sit there for a couple minutes then continue through some of the shutdown sequence, then attempt to unmount it again (waiting a couple more minutes) then finally restart. an unmount of, say 15 seconds, seems logical. if it's not unmounted by then there must be a problem...since they always mount/unmount really quickly

    Thanks in advance!!

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,930
    The only option that seems to take into account times is the 'ttl=...' option (see man smbmount). Does changing this have any effect?

    You might also be able to tweak things with the socket options (these are explained in the man page for smb.conf), and specified in /etc/fstab by 'sockopt=...'.

    If you're mounting from a windows computer, then perhaps the windows end has some tweaks you can make to speed this up too?
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    Quote Originally Posted by Roxoff
    The only option that seems to take into account times is the 'ttl=...' option (see man smbmount). Does changing this have any effect?

    You might also be able to tweak things with the socket options (these are explained in the man page for smb.conf), and specified in /etc/fstab by 'sockopt=...'.

    If you're mounting from a windows computer, then perhaps the windows end has some tweaks you can make to speed this up too?
    i didn't really look too much further into ttl as the delay is set by default to 1000ms, which seems fast enough. the system would usually hang for around 30 or 40 seconds

    i'm now trying the 'sockopt=IPTOS_LOWDELAY' option in the /etc/fstab entry and it still mounts...i just have to wait and see if the problem stops. it was just very sporadic before so all i can do is wait. the server is also a linux computer (using samba since we're sharing with 3 windows computers as well).

    thanks a lot for your help Roxoff

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,930
    If you're sharing between Linux machines, you should try to use NFS, it is native directory-sharing, and is quicker than samba. It'll quite happily co-exist with samba too, the only drawback is file ownership and permissions, as all users on both linux machines should use the same user-id's (it's worth it though for the speed...)
    Linux user #126863 - see http://linuxcounter.net/

  6. #5
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    Quote Originally Posted by Roxoff
    If you're sharing between Linux machines, you should try to use NFS, it is native directory-sharing, and is quicker than samba. It'll quite happily co-exist with samba too, the only drawback is file ownership and permissions, as all users on both linux machines should use the same user-id's (it's worth it though for the speed...)
    Thanks for the suggestion, but I'm happy how it runs now. I've had a lot of trouble getting it set up in the first place (until AlexK's fileserver tutorial) and it's an old computer (PII, 133Mhz, 64MB RAM). I'm just content with how it runs now and am thrilled that I got it working at all.

    But, just for curiosity's sake, what kind of speed difference could I expect? Would it be worth it, even with an older machine like this? I'm just trying to limit how many daemons startup to keep some RAM free....though I am using Debian (all command-line).

    Right now, I get a upload download speed from my other linux computer to the old server of around 4MB/s. Any idea what kind of difference I could expect? I'm really happy with it as it is, but if I get bored I might consider adding NFS to the mix

    I also think that the small option that I added to the /etc/fstab line might have worked (I haven't had an odd freeze since...), but it may be too soon to tell


    Thanks a lot for your help Roxoff, and for your NFS suggestion. If I think it'll really help a lot I might consider adding it on. I just really don't want to cause problems with how everyone else is getting their files shared or slow their speeds down because I want a slight speed increase...that's my only concern

  7. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,930
    I dont know how much faster it would be, but I wouldn't even consider using samba to connect shares between linux computers.

    The good news is that you dont have to turn off the samba sharing to turn on the NFS sharing. They'll run happily side-by-side. If you add NFS shares, you can do your own speed testing and see how it performs.

    Take a look at the man pages for /etc/exports and /etc/fstab for a few pointers about how to crank the handle of NFS. It's pretty straightforward for the most part (significantly easier than samba) just make sure the user IDs on both Linux machines match for the permissions to work properly.
    Linux user #126863 - see http://linuxcounter.net/

  8. #7
    Linux Enthusiast
    Join Date
    Jun 2005
    Location
    Odessa, FL
    Posts
    586
    Quote Originally Posted by Roxoff
    I dont know how much faster it would be, but I wouldn't even consider using samba to connect shares between linux computers.

    The good news is that you dont have to turn off the samba sharing to turn on the NFS sharing. They'll run happily side-by-side. If you add NFS shares, you can do your own speed testing and see how it performs.

    Take a look at the man pages for /etc/exports and /etc/fstab for a few pointers about how to crank the handle of NFS. It's pretty straightforward for the most part (significantly easier than samba) just make sure the user IDs on both Linux machines match for the permissions to work properly.
    How would I make the ID's match if they aren't the same? I think this is the problem I ran into a while ago in the past. Right now, using Samba, I added to the /etc/fstab line the uid=###,gid=### option so the ID's don't have to match up. I don't know whether or not they do, but this just ensures it'll work properly.

    Would I just change their ID's on the server within /etc/passwd ? I'm assuming that there's more than that.

    Thanks a lot for your help! I'll try NFS this weekend when I get the time and do a quick benchmark

  9. #8
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,930
    You can use the 'find' command to dig out files by uid/gid and pipe output into chown with a little patience (I'm sure somebody can even give you a command line to do this). In practice, you've normally only gotta change files in each users 'home' directory, and any mail files they have in /var/spool/mail. Then it's just a matter of editing /etc/passwd and /etc/group so the ID's match up.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •