Fuse-zip mounted file systems at shutdown or reboot

Just now I ran into an unexpected behavior: I had a zip file mounted and rebooted after a package upgrade. When I mounted the zip file again it did not contain the file that I had added before the reboot. My expectation was that all file systems are unmounted after flushing out any pending changes.

What would be the recommended way to go about this?

Yes, but a ZIP file is not a filesystem — a FUSE-mount of a ZIP file is actually a pseudo-filesystem — and if you still had it open without saving any changes to it yourself, then shutting down the system — or rebooting — won’t also be saving the unsaved changes.

Shouldn’t there be a shutdown hook that does a fusermount -u on all remaining mounted fuse-zip file systems? Other user mounted file systems do get unmounted and one could argue that whether a file system was mounted one way or another does not make a difference conceptually only technically.

This I do not know — sorry. :man_shrugging:

So, where would I best suggest such a change?

@philm is the one who maintains mkinitcpio, but first better check if you have the shutdown hook in your /etc/mkinitcpio.conf. If you don’t, add it and rebuild your initcpios. :arrow_down:

sudo mkinitcpio -P

Hasnt shutdown been deprecated for … like a decade now?

https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/3RK7CTPX3ABBSBWLR5LO62DIGBMNVYOX/

I could be wrong, but I thought I saw @philm recommend adding it again only recently. :man_shrugging:

I could imagine having a systemd user unit that gets triggered on logout (assuming a logout happens before a reboot or shutdown) but I’m honestly not knowledgeable enough to tell whether that’s a good idea…

In and of itself, it does not seem to be a bad idea to me either. systemd does allow for user-specific units and even timers.

1 Like