[Bug 48517] Re: Improper filesystem unmount order (swap on files)
Rolf Leggewie
48517 at bugs.launchpad.net
Sun Jan 1 22:49:42 UTC 2017
This has been fixed a long time ago in version 2.86.ds1-11 in Debian.
** Changed in: sysvinit (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sysvinit in Ubuntu.
https://bugs.launchpad.net/bugs/48517
Title:
Improper filesystem unmount order (swap on files)
Status in sysvinit package in Ubuntu:
Fix Released
Status in sysvinit package in Debian:
Fix Released
Bug description:
Binary package hint: initscripts
When turning off my computer, I noticed one `failed' status line. It was:
* Unmounting local filesystems [fail]
Followed by:
* Deactivating swap [ok]
Since I use ordinary files instead of dedicated partitions for swap, I
found that very natural. I also think it is more than just a valid
usage pattern (no problems with resizing partitions etc) and with
regards to that, suggest the following patch to /etc/init.d/umountfs:
20,40c20
< # List all mounts, deepest mount point first
< LANG=C sort -r -k 2 /etc/mtab |
< (
< DIRS=""
< while read DEV DIR TYPE REST ; do
< if [ "x$TYPE" == "xtmpfs"]; then
< DIRS="$DIRS $DIR" # Unmount tmpfs before turning off swap
< fi
< done
< umount -r -d $DIRS
< )
<
< # Make sure tmpfs file systems are umounted before turning off
< # swap, to avoid running out of memory if the tmpfs filesystems
< # use a lot of space.
< log_action_begin_msg "Deactivating swap"
< swapoff -a
< log_action_end_msg $?
<
< # Umount all filesystems now
---
> # Umount all filesystems except root and the virtual ones
63a44,50
>
> # Make sure tmpfs file systems are umounted before turning off
> # swap, to avoid running out of memory if the tmpfs filesystems
> # use a lot of space.
> log_action_begin_msg "Deactivating swap"
> swapoff -a
> log_action_end_msg $?
It firstly unmounts tmpfs, then deactivas swap and remaining
filesystems lastly. I'd like to hear if there are any reasons for not
applying this patch, if any.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/48517/+subscriptions
More information about the foundations-bugs
mailing list