[systemd-devel] Second (erroneous) check of rootfs?
Lennart Poettering
lennart at poettering.net
Wed Jan 7 16:43:52 PST 2015
On Thu, 08.01.15 03:36, Nikolai Zhubr (n-a-zhubr at yandex.ru) wrote:
> Hi,
>
> I'm not quite sure if it belongs to systemd or rather dracut or even
> opensuse bugtracker... Please feel free to redirect me as appropriate.
>
> Below is a fragment of jounal of one boot of opensuse 13.2, irrelevant parts
> replaced by dots to compact it a bit.
> In short, AFAICS:
>
> 1. In initrd, root disk is found as "uuid-588d..." and successfully fsck'ed.
>
> 2. Next, it is mounted read-only to /sysroot. It should here be noted that
> mounting read-only AFAIK is no guarantee that no modifications can happen to
> the underlying media (E.g. some filesystems might start background recovery
> even in read-only state, including IIRC ext3+).
>
> 3. Before remounting root fs to / as read-write, a second fsck is performed.
> I consider this probably unwise because:
> -- it is unnecessary and just increases boot time,
> -- if root fs is in some trouble then fsck'ing it while still mounted might
> break it even harder in some cases (depending on fs type and condition)
The fsck of the root file system is done by
systemd-root-fsck.service. It exists both in the initrd and on the
host. When the transition between the initrd and the host takes place
the state of the unit is serialized/unserialized. And since
RemainAfterExit=yes is set if it was started once it will not be
started again because it will still be considered started.
Maybe suse forgot to include this service file in the initrd or so?
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list