Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Thomas Bächler (brain0)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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

Closed by  Tom Gundersen (tomegun)
Sunday, 08 May 2011, 13:00 GMT
Reason for closing:  Fixed
Comment by Joker-jar (Joker-jar) - Sunday, 13 June 2010, 11:43 GMT
> Duplicate of bug #19718

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
Comment by Thomas Bächler (brain0) - Monday, 14 June 2010, 11:28 GMT
Before we start, you shouldn't worry too much about your /home, remounting it read-only is just as good umounting it in terms of data integrity.

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?
Comment by Joker-jar (Joker-jar) - Monday, 14 June 2010, 11:35 GMT
I think notmpfs was added because of /dev is mounted as tmpfs
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 04 July 2010, 20:23 GMT
@Joker-jar: Exactly (previously ramfs was used, but does not support ACL like tmpfs)

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.
Comment by Gerardo Exequiel Pozzi (djgera) - Sunday, 04 July 2010, 20:26 GMT
bah!, nodevtmpfs is not needed if devtmpfs support is not enabled.

Minor fix attached.
Comment by Leonid Isaev (lisaev) - Saturday, 04 December 2010, 21:33 GMT
I just came across this one and quite confused...
@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?
Comment by Tom Gundersen (tomegun) - Monday, 28 March 2011, 12:44 GMT
@Gerardo: this sounds like a sensible workaround. Please post your patches on <arch-projects@archlinux.org> for review.

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?
Comment by Tom Gundersen (tomegun) - Saturday, 23 April 2011, 14:37 GMT
@Joker-jar,
Could you test this patch: <https://github.com/teg/initscripts-arch/commit/abc4cc35b52b25fc6f19dc9e394bd16effba9879>?

@everyone else,
any objections to that patch?

Loading...