Everything posted by TrevP
-
[Plugin] Mover Tuning
I know how thresholds work. I have thresholds set to 0%; meaning move "everything". The mover isn't moving folders that happen to have no files in them; it's ignoring them. I can recreate this every time as per the example I gave in my original post. Even a pure empty folder structure should be preserved and moved to the array for protection; the default behavior of the mover ignores empty folder structures; they are not moved across. This is why I'm wondering if we could add an option to treat folders just like files; don't ignore them if they happen to be empty.
-
[Plugin] Mover Tuning
To me "move", means move everything. files and folders. If not, we are going to be left with a bunch of unmoved, not array protected folder structures. Is it possible to add the following option: Items to move -> Files only : current default behavior Files and Folders : Treat Folders just like files. Move them as well, even if the folder is empty.
-
[Plugin] Mover Tuning
CA Mover Tuning does not seem to handle empty folder trees on cache Steps to reproduce: On the cache create an empty folder tree only, for example: mkdir -p /mnt/cache/testshare/1/2/3/4/5 Do not put any files in it. Make sure the share is set to use the cache and to be moved to the array (user0). In CA Mover Tuning set all move thresholds to 0 so the mover will always run. In CA Mover Tuning set Clean empty folders to Yes or to Top folder. Run the mover. The result is nothing is moved. The folder tree stays on the cache exactly as it was. It looks like the plugin just says there is no work to do because there were no files in that path. I expect even if there are no files in the folder the plugin should still check that folder. The empty folder structure should be mirrored to the array (user0) as part of the move. After that, because Clean empty folders is enabled, the same empty folder structure on cache should be removed, including the top folder if that option is selected. How it currently works, can (and does) leave lots of empty folders sitting on the cache that aren't moved/mirrored to the array. That is the exact thing the Clean empty folders and Top folder options are meant to clean up. Right now it only seems to clean when it has actually moved a file first.
-
Empty cache share directory triggers “Some or all files unprotected” even though cache usage is 0 (breaks NFS if removed)
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.
-
Empty cache share directory triggers “Some or all files unprotected” even though cache usage is 0 (breaks NFS if removed)
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.
-
Empty cache share directory triggers “Some or all files unprotected” even though cache usage is 0 (breaks NFS if removed)
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 In Unraid create a user share and set its storage to Cache → Array. Export the share over NFS and mount it from a client so that the path must remain present. Write any file from an NFS client to the share so that Unraid creates /mnt/cache/<share>. Run the Mover (set to move all) and wait until it completes. Go to Shares → (that share) → Size → Compute and confirm that Cache shows 0 usage. On the console run ls -l /mnt/cache/<share> and confirm the directory exists but is empty. Return to Shares and observe the yellow triangle “Some or all files unprotected” for that share. Delete /mnt/cache/<share> and refresh Shares; the indicator changes to green. On the NFS client observe that the mount now reports a stale file handle or similar error because the exported path disappeared.