Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empty cache share directory triggers “Some or all files unprotected” even though cache usage is 0 (breaks NFS if removed)

Featured Replies

I’m currently trialing Unraid and overall it’s been going well, but I’ve hit a small UI/behavior thing that’s really bugging me. It looks like the Shares page will flag a share as “Some or all files unprotected” even when the cache is actually empty, as long as an empty top level directory for that share still exists on /mnt/cache. In my case that directory has to stay there because NFS clients are mounting that exact path, and if I remove it the GUI goes green but all the NFS clients throw stale handle errors.

On Unraid [7.1.4] a user share that is configured as “Cache → Array” can still show “Some or all files unprotected” even when the cache is actually empty for that share. You can verify the cache is empty by going to Shares and using Compute under Size, which reports 0 usage on Cache for that share. The warning persists only because an empty top level directory for the share is still present at /mnt/cache/<share>, which is needed so NFS clients that mount or export that exact path do not lose their handles. If you delete that directory the GUI immediately turns green, but your NFS clients then get stale file handles. That means the current behavior forces a choice between an accurate protection indicator and keeping NFS mounts stable. (Note: I'm using the CA Mover Tuning plugin and have set "Mover Tuning - Options", "Clean empty folders" to "Top Level". So this is AFTER a full cache move to array)

Steps to reproduce

  1. In Unraid create a user share and set its storage to Cache → Array.

  2. Export the share over NFS and mount it from a client so that the path must remain present.

  3. Write any file from an NFS client to the share so that Unraid creates /mnt/cache/<share>.

  4. Run the Mover (set to move all) and wait until it completes.

  5. Go to Shares → (that share) → Size → Compute and confirm that Cache shows 0 usage.

  6. On the console run ls -l /mnt/cache/<share> and confirm the directory exists but is empty.

  7. Return to Shares and observe the yellow triangle “Some or all files unprotected” for that share.

  8. Delete /mnt/cache/<share> and refresh Shares; the indicator changes to green.

  9. On the NFS client observe that the mount now reports a stale file handle or similar error because the exported path disappeared.

Edited by TrevP

Solved by TrevP

  • Community Expert
8 hours ago, TrevP said:

The warning persists only because an empty top level directory for the share is still present

This is normal and expected as it currently works, if you want to make a share exclusive, for example, just the folder cannot exist on different storage, so I think that needs to be reported in the GUI when it does.

Also note that we don't recommend using NFS with pools with primary and secondary storage; after the mover runs, you will likely get stale file handles. NFS is best used with exclusive shares, or shares that just have primary storage set.

  • Author

Interesting. SMB doesn't have this issue, so it appears (for my use case) I'm going to move from NFS to SMB.
Thanks for the follow-up!

Side Note: "Also note that we don't recommend using NFS with pools with primary and secondary storage; after the mover runs, you will likely get stale file handles. NFS is best used with exclusive shares, or shares that just have primary storage set." -> Is this in the documentation some place? I can't seem to find it.

  • Community Expert

I believe it's not in the official docs, but it's been a recommendation for many years.

  • Author
  • Solution

After experimentation, I was also seeing the same thing using SMB exports. After CA Mover tuning runs, AND if you have remove top level folders enabled (to keep the “Some or all files unprotected” warning at bay), I found the actual solution in this thread : PSA/HOW-TO Proper fix for SMB stale file handle
Hint: add "noserverino" to the fstab mount line

(Details of "why" this works is in the link)

The magic fstab line that works for me is this:
//<UNRAIDSERVER>/<SHARENAME> <LOCALMOUNTPOINT> cifs rw,guest,uid=99,gid=100,_netdev,noatime,noserverino,noperm,exec 0 0

This solves everything for me. I suspect this will also work for NFS mounts as well.
Hope it helps others.


Edit: this does NOT work with NFS mounts as "noserverino" is a cifs only option. NFS mounts will go stale if the "cache" mount point disappears.

Edited by TrevP

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
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.