• Stale File Handle with NFS (6.12-rc2)


    DiscoverIt
    • Minor

    It's been well documented that NFS v3 and UnRaid never play nicely and throw Stale File Handle errors when the mover initiates with cache:yes/prefer selected. On 6.11.x this was relatively trivial to remedy by manually forcing vers=4.2 on the client side. With 6.12-rc2 this doesn't seem to be enough anymore. I've noticed that when the mover initiates (similar to pre 6.12 w/ NFS vers=3) the nfs client throws a stale file handle error which requires unmounting and remounting of the export. Is there a mount option or export option I'm missing to prevent these from occuring or is this the same issue just being exposed now in 6.12-rc2?

     

    "backups" share NFS settings

    10.253.0.2(rw,no_root_squash)

     

    systemd Mount on Remote Box

    [Unit]
    Description=Mount NFS Share
    DefaultDependencies=no
    Conflicts=umount.target
    After=systemd-networkd-wait-online.service
    Wants=systemd-networkd-wait-online.service
    Before=umount.target
    
    [Mount]
    What=10.253.0.1:/mnt/user/backups
    Where=/nfs/backups
    Type=nfs
    Options=vers=4.2,rsize=1048576,wsize=1048576
    
    [Install]
    WantedBy=multi-user.target

     

    As a stop-gap I'm running a systemd timer on the remote box to exec this shell script every 30s.

    #!/bin/bash
    for directory in $(df 2>&1 | grep '10.253.0' | awk '{print ""$6"" }' | tr -d \:)
     do
      status=`stat $directory 2>&1 | grep -i "stale"`
      if [ "${status}" != "" ]; then
        folder=$(echo "$directory" | rev | cut -d"/" -f1  | rev)
        umount -l "$directory"
        systemctl start nfs-$folder.mount
        /root/discord_notify.sh "SFH Detected" "The mount point $folder experienced a stale file handle and was remounted"
      fi
    done

     

     




    User Feedback

    Recommended Comments

    I've experienced the exact same behavior right out of the box on a fresh install of rc2 with all new disks. This is my first time using Unraid being attracted by the ZFS support. This happened with XFS, btrfs and zfs array and pool devices so the underlying filesystem didn't seem to have an impact.

     

    After a lot of searching and head scratching I've been able to solve this issue by setting:

    "Tunable (support Hard Links): No" under Settings > Global Share Settings.

     

    This definitely isn't ideal for a lot of people, especially those who use torrents but for me it's acceptable for now. Hopefully someone official weighs in on this. I've verified NFS 4.2 is being used by the mounted shares and no amount of monkeying with the nfs mount or export settings made any impact on this issue.

    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.