[systemd-devel] Safe handling of root filesystem on shutdown

Daniel Drake dsd at laptop.org
Thu Apr 12 07:46:01 PDT 2012


On Thu, Apr 12, 2012 at 4:56 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> I think I added this logic primarily to make the shutdown loop quiet.
>
> However I must admit that that's just a guess and since my commit
> message is disappointingly unconclusive about this I am a bit lost...
>
> If you revert f3accc08, do things look good for you then? Do you get any
> log spew on shutdown?

I had to revert d72238fcb34abc81aca97c5fb15888708ee937d3 first.
Then I reverted f3accc08, and modified systemd-shutdown to log to kmsg
so that I could see the messages before power-down.

[  441.206413] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  441.239944] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  441.263633] systemd-shutdown[1]: Unmounting file systems.
[  441.280554] systemd-shutdown[1]: Unmounted /var/lib/random-seed.
[  441.297471] systemd-shutdown[1]: Unmounted /var/lib/dhclient.
[  441.320312] systemd-shutdown[1]: Unmounted /var/lib/dbus.
[  441.340072] systemd-shutdown[1]: Unmounted /dev/hugepages.
[  441.355911] systemd-shutdown[1]: Unmounted /sys/kernel/debug.
[  441.372049] systemd-shutdown[1]: Unmounted /dev/mqueue.
[  441.387525] systemd-shutdown[1]: Unmounted /home.
[  441.751119] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[  441.831283] systemd-shutdown[1]: Disabling swaps.
[  441.846084] systemd-shutdown[1]: Detaching loop devices.
[  441.864999] systemd-shutdown[1]: Detaching DM devices.
[  442.965933] ACPI: Preparing to enter system sleep state S5
[  443.080153] Power down.

The mmcblk0p2 message above suggests that / is being re-mounted
readonly, and also on next boot the system no longer complains about /
not being cleanly unmounted. Tested with 3 reboots to be sure.

Reverting these commits seems like a good solution to me. If you go
ahead with this, I'd also appreciate it if you could apply the fix to
the F17 package next time you are touching things there.

Thanks!
Daniel


More information about the systemd-devel mailing list