I have an immich instance having a nfs mount to an unraid share.
When I stop the array while there is open files through NFS, it makes unraid stuck, not able to stop the array, unable to change any other settings in unraid, and the nfs clients are unable to unmount, probably because the nfs server or the exports are down before the array is stopped.
It would be great to prevent the array to be stopped if any file is locked, to not block all the rest.
I don't know how to prevent the stop depending on the locked files... Maybe with a user script, but it feels really hacky.
Because of that, I lost data because of an array maintainance during a photo upload. The pictures upload was in progress while the array stop interrupted the upload, and as the files are locked, the app is not able to recover when the server is back.
Client options :
addr=10.253.0.0,rw,nolock,hard,nfsvers=4,tcp,noexec
Btw, the nolock option seems to not be considered as the locks are still there
Server export options:
sec=sys,rw,no_root_squash,sync
HOW TO REPRODUCE
- prereq: nfs mount setup targeting a share inside the array, mount up and working
- open a file and keep it open on the client side
- ack that the file is locked using `lsof | grep /mnt/disk`
- stop the array
At this moment:
- you should have in the logs `error: rmdir: /mnt/user resource busy`.
- you cannot change any setting anywhere in unraid
- you cannot unmount on the nfs client side
I hope it's just a matter of nfs configuration...