Open grahamperrin opened 3 years ago
Is this something automount
could help with @vermaden? What is your take on this?
The automount
keeps all mounted filesystems in the /var/run/automount.state file so one can add a loop into /etc/rc.suspend or /etc/rc.resume to execute /usr/local/sbin/automount ${cdev} detach command for each mounted by automount
device.
Thanks, might that detach a ZFS pool's device before the pool is cleanly exported?
Thanks, might that detach a ZFS pool's device before the pool is cleanly exported?
If the mounted FS is ZFS then yes but automount
do not support ZFS currently.
OK, I should probably refine the subject line of this issue. We need:
– and:
/usr/local/sbin/automount
to not detach any such device. I cannot imagine we should solve this within helloSystem but should discuss this with FreeBSD upstream.
IMHO You should submit new FreeBSD bug for that occasion :)
"Might there be a future improvement to support for USB?" – tumble-weed in the weeks since I asked.
From the silence, I assumed that there's zero interest :-(
Needs to be clarified whether having FreeBSD installed to a USB disk formatted with ZFS means that we should not put the computer to sleep. This would be a bummer.
cc @crees
With recent changes to sysutils/lsof, it should be easier to tell which files are open at a mount point that uses ZFS.
If the end user can be informed, then there can be a decision. Whether to:
A generic title for this issue. For starters:
Suspend/resume versus storage on USB
https://lists.freebsd.org/pipermail/freebsd-current/2020-September/077010.html
https://lists.freebsd.org/pipermail/freebsd-current/2020-November/077681.html
∴
Degrees of adversity
Where the mounted file system is (for example) FAT 32 or NTFS: adversity may be negligible.
With OpenZFS on FreeBSD: if there's a single-device pool (i.e. USB flash/thumb drive or mobile HDD/SSHD/SSD) then there's near-certainty that the pool will require at least a scrub, which might be frustratingly time-consuming (and I should not recommend writing to its file system(s) during the scrub). https://www.freebsd.org/cgi/man.cgi?query=zpool&sektion=8
… and so on. Not intended to be comprehensive.