FS#19783 - [initscripts] shutdown: unmount tmpfs partitions
Attached to Project:
Arch Linux
Opened by Joker-jar (Joker-jar) - Sunday, 13 June 2010, 09:32 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 08 May 2011, 13:00 GMT
Opened by Joker-jar (Joker-jar) - Sunday, 13 June 2010, 09:32 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 08 May 2011, 13:00 GMT
|
Details
There's a part of my /etc/fstab:
| ... | /dev/sda3 /home ext4 defaults,noatime 0 2 | ... | tmpfs /home/joker-jar/.opera/cache tmpfs size=100M,mode=0777 0 0 When computer halts or reboots after terminating all deamons appears message: | umount: /dev/sda3 busy - remounted read-only Look at the rc.shutdown: | stat_busy "Unmounting Filesystems" | /bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc -O no_netdev | stat_done unmount skipping tmpfs and trying to unmount /dev/sda3 when /home/joker-jar/.opera/cache is still mounted P.S. Sorry for my bad english |
This task depends upon
Sure? I think that
/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc -O no_netdev
must unmount user defined tmpfs mount points, but "notmpfs" forbids it. #19718 just add devtmpfs to the list
This problem is tricky - I don't know the exact reason why notmpfs was added here. Removing it might be just as bad as leaving it in there. How do we distinguish between tmpfs mounts that we want to umount and the ones we want to keep?
Then since current kernel26 is devtmpfs eneabled, notmpfs is not needed anymore (also noramfs), this patch allows umount ramfs and tmpfs only if devtmpfs is used, otherwise things keeps like now. (for example kernel26-lts does not enable devtmpfs)
Please test.
Minor fix attached.
@Joker-jar:
1. Are you sure it's a good idea to put user-specific stuff in fstab? For instance, what is the problem with using /dev/shm or (/var)/tmp?
2. Why can't umount for ~/.opera go into rc.local.shutdown?
... or am I missing something here?
I guess a more robust fix would be to either
1) blacklist a list of mountpoints (like /dev and other api mountpoints), rather than a list of mount types, but that would require more work (and a bigger maintenance burden), or
2) unmount all persistent devices, and all their descendants.
What do you think?
Could you test this patch: <https://github.com/teg/initscripts-arch/commit/abc4cc35b52b25fc6f19dc9e394bd16effba9879>?
@everyone else,
any objections to that patch?