On Sun, Dec 19, 2010 at 01:24:50PM +0100, Miklos Vajna <[email protected]> 
wrote:
> I take it back. It's smart enough to detect not to fsck virtual disk
> devices and I was testing this in a virtual machine. ;)
> 
> I just added it to http://wiki.frugalware.org/index.php/Systemd#TODO and
> will have a look at it when I can test this on a real machine.

It turns out this was not the reason. systemd has this "socket
activation" feature - which means systemd creates the socket (for
example /dev/log for syslog) and it starts the daemon only in case
someone actually connects to it.

Now systemd expects that syslog already has this feature. So we have two
choices:

- do massive hacks to let systemd do not expect this
- add the little backwards-compatible patch to syslog

I choosed the second, and now the output of fsck is logged in
/var/log/syslog:

# grep fsck /var/log/syslog |tail -n 1
Dec 19 23:11:16 frugalware kernel: systemd-fsck[1411]: /dev/sda1: clean, 
68854/524288 files, 377743/2096474 blocks

(It's first logged to dmesg, then once syslog is running the dmesg is
saved to syslog, but you can ignore that detail.)

The point is that now the fsck output appears somewhere, while it did
not before.

Now let's return to the original question: progressbar. The problem is
that systemd executes the fsck for each partition in parallel. Basically
this is nice - it saves a lot of time if you have multiple disks - but
then you can't really have a progressbar, since you would see a mix of
the fsck outputs on the tty. :)

I created a proof of concept patch:

http://frugalware.org/~vmiklos/patches/systemd-fsck-use-C-for-root-fs.patch

This does not allow any other service to write or read from the tty
while fscking the root device and outputs a progressbar as requested.
But I'm not adding it to our package at the moment, I think it'll be
better to discuss it on the systemd-devel list first, maybe others have
a better idea.

Attachment: pgpBpRVwMSjDG.pgp
Description: PGP signature

_______________________________________________
Frugalware-devel mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-devel

Reply via email to