I want to build a family NAS at home. I want to use SnapRAID for integrity. So, it needs to run SnapRaid sync periodically. The sync process requires the data is not being changed while it is running, however. So, I need to make a script that does this:
- Check that no files are being written over the NFS shares at the moment.
- If they are, wait and repeat
- Make NFS read-only
- Run sync
- Make NFS RW again
The questions are:
- How to do #1?
- How to do #3 without causing too much alarm on the client side? I can
mount -remount,ro
the drives themselves, or edit/etc/shares
. Or is there another way?
Advise me please...