Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Serious NFS Issues

  1. #1
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,041
    Distro
    Kubuntu

    Serious NFS Issues

    I decided to switch my environment to NFS, since I'm all-Linux, and decided it would be better than using Samba for everything. Unfortunately, the results have been catastrophic. Before I get started, the server is running a fully up to date (as of last weekend) installation of Server 12.04 LTS.

    The major issue that I'm facing is that sometimes umounting NFS on my client computer will completely lock up the server to the point where it's so busy that you can't execute *any* command. No TTY's respond to login requests, so I cannot log in to the server when this occurs, nor can I ssh or enter any command that would shut it down safely. My only recourse is to hold the power button down. Since this is RAID/LVM, I'm especially not a fan of doing this.

    The error on the screen repeatedly is this (it shows these errors right after the login prompt):
    Code:
    INFO: task nfsd:2499 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    INFO: task kworker/u:2:3999 blocked for more than 120 seconds.
    "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    The minor issue that I'm facing is that the user and group shows up as 4294967294 when I mount an NFS share (when it does work). I Googled like crazy and virtually every site I find tells me to edit /etc/idmapd.conf and put in the domain name on each machine. I've done this. It does NOT help. I already checked that the uid and gid is the same on each machine, including the server.

    I'm using no_subtree_check, rw, and async options. (I'm trying hard to get the server to shut down right now, so I can post the exact /etc/exports later if needbe).

    I am mounting the shares with this command:
    Code:
    sudo mount -t nfs4 -o rw pluto:/share/Archive /mnt/Pluto/Archive

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,030
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Serious NFS Issues

    For the second issue, make sure you have /etc/hosts defined on each machine that needs NFS access. For the first issue, my guess is that there are pending reads or writes that are preventing the NFS daemon from unmounting the share. It could be as simple as a terminal window that has landed on a share directory or a Nautilus window with a share directory open. These use cases are probably better handled by SAMBA.

    NFS is an old framework that is optimized for continuous mounts between clients and servers. SAMBA is better-suited for spontaneous user mounts and dismounts.
    Last edited by tgalati4; January 23rd, 2014 at 09:09 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,041
    Distro
    Kubuntu

    Re: Serious NFS Issues

    Quote Originally Posted by tgalati4 View Post
    For the second issue, make sure you have /etc/hosts defined on each machine that needs NFS access. For the first issue, my guess is that there are pending reads or writes that are preventing the NFS daemon from unmounting the share. It could be as simple as a terminal window that has landed on a share directory or a Nautilus windows with a share directory open. These use cases are probably better handled by SAMBA.

    NFS is an old framework that is optimized for continuous mounts between clients and servers. SAMBA is better-suited for spontaneous user mounts and dismounts.
    In my case, the server itself wouldn't have problems writing if it's the client that's doing all the writing, would it?

    My understanding of Samba (and the reasons I moved away from it) is that NFS is better for an all-Linux environment, and that NFS handles UNIX permissions better than Samba. In my case, I was losing permissions when copying files.

    Personally I don't see why NFS wouldn't be a viable choice. When I want to connect to a share, I mount it. When I'm done, I unmount. That doesn't seem to be a use-case that NFS wouldn't be able to handle, especially considering that's exactly what it was designed to do. The only reason I can think of is a problem in my configuration.

    I'm curious what you mean by /etc/hosts though, I have a DNS server (bind) that handles this for me, unless there's something that's also required in /etc/hosts.

    Now that my server is up, I can post my /etc/exports:
    Code:
    /share/Archive 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Backup 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Downloads 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Private 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Public 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Videos 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    Thanks for the reply!

  4. #4
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Serious NFS Issues

    Quote Originally Posted by jlacroix View Post
    In my case, the server itself wouldn't have problems writing if it's the client that's doing all the writing, would it?

    My understanding of Samba (and the reasons I moved away from it) is that NFS is better for an all-Linux environment, and that NFS handles UNIX permissions better than Samba. In my case, I was losing permissions when copying files.

    Personally I don't see why NFS wouldn't be a viable choice. When I want to connect to a share, I mount it. When I'm done, I unmount. That doesn't seem to be a use-case that NFS wouldn't be able to handle, especially considering that's exactly what it was designed to do. The only reason I can think of is a problem in my configuration.

    I'm curious what you mean by /etc/hosts though, I have a DNS server (bind) that handles this for me, unless there's something that's also required in /etc/hosts.

    Now that my server is up, I can post my /etc/exports:
    Code:
    /share/Archive 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Backup 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Downloads 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Private 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Public 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    /share/Videos 10.10.96.0/255.255.252.0(rw,sync,no_subtree_check) 10.10.97.0/255.255.252.0(rw,sync,no_subtree_check)
    Thanks for the reply!
    Try changing the sync to async in the export lines.
    -BAB1

  5. #5
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,041
    Distro
    Kubuntu

    Re: Serious NFS Issues

    Quote Originally Posted by bab1 View Post
    Try changing the sync to async in the export lines.
    I thought about that, but isn't that considered dangerous?

  6. #6
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    8,030
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Serious NFS Issues

    Using proper /etc/hosts on your clients and server can help solve some mysterious problems with older frameworks like NFS. async is only problematic if you dismount a share at random times. SAMBA gives a pop-up that lets you know if a share is locked or has pending writes. Not sure if NFS does.

    NFS is a viable choice if you work in a laboratory and you have a desktop workstation that is crunching data and a server that is used for backup and sharing with other linux/unix computers in a lab. These mounts are continuous and typically established once and kept permanent. https://help.ubuntu.com/community/SettingUpNFSHowTo

    So although you insist that NFS is supposed to handle your use case, it is an older framework designed for permanent mounts. There is autofs that will get NFS to act more like SAMBA with spontaneous mounts, but I don't have experience with it. Others will have to weigh in.
    Last edited by tgalati4; January 23rd, 2014 at 09:25 PM.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  7. #7
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,041
    Distro
    Kubuntu

    Re: Serious NFS Issues

    Quote Originally Posted by tgalati4 View Post
    Using proper /etc/hosts on your clients and server can help solve some mysterious problems with older frameworks like NFS. async is only problematic if you dismount a share at random times. SAMBA gives a pop-up that lets you know if a share is locked or has pending writes. Not sure if NFS does.

    NFS is a viable choice if you work in a laboratory and you have a desktop workstation that is crunching data and a server that is used for backup and sharing with other linux/unix computers in a lab. These mounts are continuous and typically established once and kept permanent. https://help.ubuntu.com/community/SettingUpNFSHowTo

    So although you insist that NFS is supposed to handle your use case, it is an older framework designed for permanent mounts. There is autofs that will get NFS to act more like SAMBA with spontaneous mounts, but I don't have experience with it. Others will have to weigh in.
    I'll have to respectfully disagree wit you on this. At my job we have 50 Linux servers and 80-ish Linux desktop computers, and everyone mounts/unmounts NFS shares and has never seen an issue before. I, however, am having issues on my home server, so based on this I can only imagine it's something specific to me. Further, last I checked, Samba doesn't handle UNIX permissions well, therefore I can only see it viable for mixed-environments. NFS may be old, but I don't see a better option.

    Now, politics aside, is there any recommendations for me to troubleshoot what in my configuration might be causing the issue? I've been Googling for hours and have come up empty. I'll try async to see if that helps, but the only other thing I can think of is a kernel bug with my chipset (Intel Atom).

  8. #8
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Serious NFS Issues

    Quote Originally Posted by jlacroix View Post
    I thought about that, but isn't that considered dangerous?
    I try and overlook all the BS that's out there. The sync option is really safe but takes a lot of resources as it constantly syncs the buffers to the disks. When you dismount the drive as is done in shut down it can take some time. I believe async is the default on NFSv3. The risk is when the system is ungracefully shut down (power outage or ...). What file system format are you using? EXT4 or ...

    I use NFSv4 with async now. I tried sync and had problems with my home servers. I don't have a gazillion $$$ to spend on RAM and CPU to cover the overhead for my hobby machines. I do BACKUP however, so I don't see the risk. I've had no problems on 3 machines for the last 2 years.

    It's really a test anyway. Try it and see what happens. Then you can make a decision. Read the man pages for info on sync vs async.
    -BAB1

  9. #9
    Join Date
    Dec 2004
    Location
    Waterford, MI
    Beans
    1,041
    Distro
    Kubuntu

    Re: Serious NFS Issues

    Quote Originally Posted by bab1 View Post
    I try and overlook all the BS that's out there. The sync option is really safe but takes a lot of resources as it constantly syncs the buffers to the disks. When you dismount the drive as is done in shut down it can take some time. I believe async is the default on NFSv3. The risk is when the system is ungracefully shut down (power outage or ...). What file system format are you using? EXT4 or ...

    I use NFSv4 with async now. I tried sync and had problems with my home servers. I don't have a gazillion $$$ to spend on RAM and CPU to cover the overhead for my hobby machines. I do BACKUP however, so I don't see the risk. I've had no problems on 3 machines for the last 2 years.

    It's really a test anyway. Try it and see what happens. Then you can make a decision. Read the man pages for info on sync vs async.
    I had a really busy night and wasn't able to test it much, but I did test it with the async option just once and it did work (mount and unmount) so that's a start at least. I'll test further this weekend.

    I know for sure I'm still having the problem where the mounted folders show as 4294967294 in Thunar, despite the uid and gid matching on both my laptop and server. Perhaps this is normal - though I thought that if the uid/gid matched it would show the right username.

    I'll test further and see what happens.

    Thanks!

  10. #10
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Serious NFS Issues

    Quote Originally Posted by jlacroix View Post
    I had a really busy night and wasn't able to test it much, but I did test it with the async option just once and it did work (mount and unmount) so that's a start at least. I'll test further this weekend.

    I know for sure I'm still having the problem where the mounted folders show as 4294967294 in Thunar, despite the uid and gid matching on both my laptop and server. Perhaps this is normal - though I thought that if the uid/gid matched it would show the right username.

    I'll test further and see what happens.

    Thanks!
    I'll bet you have more than one problem. Deal with the sync/async issue first and then we can look into the other issues.
    Last edited by bab1; January 24th, 2014 at 06:58 AM.
    -BAB1

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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