Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1201979 - fsck for root filesystem is running twice, once in dracut once afterwards
Summary: fsck for root filesystem is running twice, once in dracut once afterwards
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-14 07:18 UTC by Till Maas
Modified: 2015-11-04 16:54 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 16:54:17 UTC
Type: Bug


Attachments (Terms of Use)

Description Till Maas 2015-03-14 07:18:21 UTC
Description of problem:
The root filesystem is checked twice for each boot, once it dracut and once afterwards:
https://bugzilla.redhat.com/show_bug.cgi?id=963283#c20

This might also be a systemd bug.

Comment 1 Zbigniew Jędrzejewski-Szmek 2015-03-14 14:03:28 UTC
Please post the full boot log (journalctl -b).

Comment 2 Dimitrios Apostolou 2015-03-21 00:45:23 UTC
Happens to me as well, I have a fedora 21 installation upgraded from previous versions repeatedly. Pasting here the relevant pieces of the boot log:


<pre>
Mar 21 01:23:07 soupermouf systemd[1]: Reached target Basic System.
Mar 21 01:23:07 soupermouf dracut-initqueue[264]: Scanning devices sda7  for LVM logical volumes vg_soupermouf/lv_root vg_soupermouf/lv_swap
Mar 21 01:23:07 soupermouf dracut-initqueue[264]: inactive '/dev/vg_soupermouf/lv_root' [50.00 GiB] inherit
Mar 21 01:23:07 soupermouf dracut-initqueue[264]: inactive '/dev/vg_soupermouf/lv_swap' [3.88 GiB] inherit
Mar 21 01:23:07 soupermouf systemd[1]: Found device /dev/mapper/vg_soupermouf-lv_root.
Mar 21 01:23:07 soupermouf systemd[1]: Starting File System Check on /dev/mapper/vg_soupermouf-lv_root...
Mar 21 01:23:07 soupermouf systemd-fsck[360]: /dev/mapper/vg_soupermouf-lv_root: clean, 764205/3276800 files, 12078014/13107200 blocks
Mar 21 01:23:07 soupermouf systemd[1]: Started File System Check on /dev/mapper/vg_soupermouf-lv_root.
Mar 21 01:23:08 soupermouf systemd[1]: Found device /dev/mapper/vg_soupermouf-lv_swap.
Mar 21 01:23:08 soupermouf systemd[1]: Started dracut initqueue hook.
Mar 21 01:23:08 soupermouf systemd[1]: Starting dracut pre-mount hook...

[ ... ]

Mar 21 01:23:18 soupermouf systemd-fsck[471]: /dev/mapper/vg_soupermouf-lv_root: clean, 764205/3276800 files, 12078014/13107200 blocks
Mar 21 01:23:18 soupermouf systemd[1]: Started File System Check on Root Device.
Mar 21 01:23:18 soupermouf systemd[1]: Starting Remount Root and Kernel File Systems...
</pre>

Comment 3 Zbigniew Jędrzejewski-Szmek 2015-03-22 17:02:48 UTC
I guess you have 'ro' in the boot options. If you change it to 'rw', root should be checked in the initramfs, and not afterwards. This is actually a good thing to do, not just a work-around for this problem.

Comment 4 Dimitrios Apostolou 2015-03-22 18:38:11 UTC
Yes you're right, thanks! It's weird though, I've been trying to debug the problem for long, and I still don't see what is exactly going on here.

BTW why is good to mount read-write already from the initramfs phase? I remember "ro" being the default in various distributions I've used since many years ago. FWIW it seems it's the default in Fedora:

# grep " ro " /etc/grub.d/10_linux 

	${linuxefi} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
	linux${sixteenbit} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}

Comment 5 Zbigniew Jędrzejewski-Szmek 2015-03-23 05:49:33 UTC
Mounting 'ro' was a hack to run fsck using the binary from the fs that is being checked. But when you have an initramfs, you can run the fsck from there, before mounting the filesystem. At that point there's no reason to mount it first ro, and then remount it rw.

Comment 6 Dimitrios Apostolou 2015-03-23 22:36:46 UTC
Right, it makes sens. So should we open a new bug for fedora mounting read-only and causing double fsck, or is this ticket enough? Zbigniew, are you a Fedora developer? Till Maas, since you reported this ticket, does mounting "rw" solve the problem for you, like it did for me?

Comment 7 Dimitrios Apostolou 2015-04-02 14:35:18 UTC
Ping, any more information you need? Shouldn't "rw" mount be the default then? Maybe this bug can be triaged by the grub packagers?

Comment 8 Harald Hoyer 2015-04-24 08:58:09 UTC
The bug of double fsck in case of "ro" is known to upstream.
http://cgit.freedesktop.org/systemd/systemd/tree/TODO#n88

I should really fix the fstab-generator in systemd.

Comment 9 Orion Poplawski 2015-04-28 15:43:45 UTC
I'm curious about the ro/rw things as well - which should be used?

I came across this bug while trying to debug a F21 VM that is failing to boot claiming it can't mount /sysroot (which it successfully does later).  Changing ro to rw seems to help, but it appears to be some kind of race so I'm not entirely sure what is up.

Comment 10 Jan Synacek 2015-04-29 05:29:23 UTC
@Orion: Maybe you're seeing https://bugzilla.redhat.com/show_bug.cgi?id=1207618?

Comment 11 Orion Poplawski 2015-04-29 14:32:32 UTC
Jan - Thanks for the suggestion, but no btrfs here.

Comment 12 Zbigniew Jędrzejewski-Szmek 2015-05-10 17:25:03 UTC
http://cgit.freedesktop.org/systemd/systemd/commit/?id=4dda4e637e

Comment 13 Fedora End Of Life 2015-11-04 15:52:42 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Orion Poplawski 2015-11-04 16:54:17 UTC
Near as I can tell, this is fixed in F22 but not F21.  Not worth bothering about that at this point.


Note You need to log in before you can comment on or make changes to this bug.