[arch-general] mkinitcpio: fsck - Does it actually make sense?
Hi, I'm wondering whether it makes actually sense to include the fsck hook into the initial ramdisk. With the "current" switch to systemd filesystems get fsck'ed by default anyway, so it seems to be sort of redundant. Is there something I'm missing here, or how do you handle this? Best regards, Karol Babioch
On Mon, Apr 8, 2013 at 10:45 PM, Karol Babioch <karol@babioch.de> wrote:
Hi,
I'm wondering whether it makes actually sense to include the fsck hook into the initial ramdisk. With the "current" switch to systemd filesystems get fsck'ed by default anyway, so it seems to be sort of redundant.
Is there something I'm missing here, or how do you handle this?
Best regards, Karol Babioch
You really want to be able to fsck the root filesystem before you mount it, as doing it while it's mounted read-only has several caveats, e.g. it requires an immediate reboot if the fsck changed anything, to ensure consistency of FS state on disk and in memory.
On Mon, Apr 8, 2013 at 10:45 PM, Karol Babioch <karol@babioch.de> wrote:
I'm wondering whether it makes actually sense to include the fsck hook into the initial ramdisk.syt
In case your filesystem needs fsck before being mounted (i.e., it is not btrfs), then the sane thing to do is to first fsck it, and then mount it; not to first mount it read-only, then fsck it and then remount it rw. As Jan pointed out, one reason is to avoid reboots. I think an equally important point is that in case there is a problem, it might mean you can't even mount your filesystem read-only, or even if you can do that using a fsck binary (and libraries) from a possibly broken filesystem might not work as the binary itself might be what needs to be fixed. All of this can easily be solved by just doing the fsck'ing from the initramfs before mounting the filesystems :-)
With the "current" switch to systemd filesystems get fsck'ed by default anyway, so it seems to be sort of redundant.
Not sure if I follow this. systemd should detect which filesystems were fsck'ed in the initramfs and not fsck them again. Are you experiencing something else? If so, we should probably fix that, nothing should be fsck'ed twice. Cheers, Tom
Am 09.04.2013 23:41, schrieb Tom Gundersen:
On Mon, Apr 8, 2013 at 10:45 PM, Karol Babioch <karol@babioch.de> wrote:
I'm wondering whether it makes actually sense to include the fsck hook into the initial ramdisk.syt
In case your filesystem needs fsck before being mounted (i.e., it is not btrfs), then the sane thing to do is to first fsck it, and then mount it; not to first mount it read-only, then fsck it and then remount it rw.
Even better, you can get rid of all remounting logic and mount your file system read-write from the start. Saves you some fraction of a second of boot time.
participants (4)
-
Jan Alexander Steffens
-
Karol Babioch
-
Thomas Bächler
-
Tom Gundersen