You are not logged in.
I have started using gocryptfs, which lets you store encrypted files in a directory, then mount (via FUSE) the directory to a decrypted view so you can read/edit the contents.
One downside of this is that you have to remember to umount the directory when you are done working.
I was thinking about putting
if mountpoint -q /plain/view/mountpoint; then
umount /plain/view/mountpoint
fi
in a cron job so that the directory gets automatically unmounted if I forget about it. But sometimes, I want to set up a long file operation to run unattended for several hours, and I don't want this cron job to interrupt it if the cron job happens to fire in the moment between copying two files (and thus, the device is not busy and gets unmounted).
Is there a good way to "mark" a device as busy until a certain operation completes and prevent unmounting it until then?
Last edited by zw (2024-12-23 18:09:11)
Offline
Try using the x-systemd.automount option with an appropriate x-systemd.idle-timeout setting, as per systemd.mount(5).
EDIT: corrected man page reference.
Last edited by Head_on_a_Stick (2024-12-23 18:38:08)
Para todos todo, para nosotros nada
Offline
Note that gocryptfs has a -idle option which will unmount the filesystem if idle for the specified duration.
Offline
arch linux auto unmounts / directory for you when pressing off button
"i love central processing unit text mode" - By: Camden Miles (thats my name)
Offline