[systemd-devel] parallel fsck vs progressbar
Lennart Poettering
lennart at poettering.net
Thu Jan 6 16:11:36 PST 2011
On Mon, 20.12.10 16:51, Miklos Vajna (vmiklos at frugalware.org) wrote:
> Hi,
>
> We got some report[1] recently that not everyone is happy with the
> current lack of fsck output during the boot process.
>
> As far as I understand there are two conflicting requirement:
>
> 1. Execute fsck processes in parallel, as in case the disks are in
> different buses then this causes massive startup speedup.
>
> 2. Provide some feedback to a user on bootup on what happens
> (progressbar), otherwise she will think the machine just hangs.
>
> Right now 1) is implemented in systemd and I understand that in case
> multiple fsck processes are running in parallel, there is no easy way to
> output a progressbar, as the result will be just a mess on the tty.
>
> OTOH many users have a simple system with a single root partition, and
> from their PoV a progressbar would not cause any slowdown. I crated a
> proof-of-concept patch[2] to demonstrate what I'm talking about.
>
> I'm aware that while this patch solves 2), it probably causes a slowdown
> in 1).
>
> So my question: Do you have an idea how could we handle the situation of
> those single-partition users? Or is the slowdown introduced by the patch
> considered minimal and it could be included?
Hmm, I am kinda keen on keeping the fsck output also in syslog, hence
just switching the output from syslog to tty is not ideal. Maybe we
should add a mechanism so that we can output things to syslog and
console at the same time. (i added this now to the todo list)
I don't think the slow-down is a real problem, so I would simply ignore
it, in particular if the output goes via a socket buffer which is
gigantic for these uses anyway.
The fsck man page says if -C is used fsck will ensure that only a single
fsck outputs things at the same time. I wonder if that only works if
fsck -A is used or also when we start multiple instances manually and
individually.
Another option could be to use -C <fd> to direct the normal output of
fsck to syslog, but the progress bar to the console.
I guess the combination of -C <fd> to direct the progress bar to the
console plus StandardOutput=syslog+console would be pretty good. the
progress bar makes no sense in the logs anyway.
I have now added two things to the todo list:
- introduce StandardOutput=syslog+console
- hack systemd-fsck to support -C with a console fd
With both in place we should have a good solution. If somebody wants to
work on this, this would be welcomed very much.
(In a Plymouth world we probably want to forward progress information to
plymouth in some way, not sure how to do this best however.)
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list