[systemd-devel] fsckd needs to go
Lennart Poettering
lennart at poettering.net
Tue Apr 28 08:33:47 PDT 2015
On Fri, 03.04.15 14:58, Lennart Poettering (lennart at poettering.net) wrote:
> systemd-fsckd would try to connect to some AF_UNIX/SOCK_STREAM socket
> in the fs, after forking and before execing fsck in the child, and
> pass the connected socket to fsck via the -C switch. If the socket is
> not connectable it would avoid any -C switch. With this simple change
> you can make this work for you: simply write a daemon (outside of
> systemd) that listens on that sockets and reads the progress data from
> it. Using SO_PEERCRED you can query which fsck PID this is from and
> use it to kill it. You could even add this to ply natively if you
> wish, since it's kinda strange to bump this all off another daemon in
> the middle, unnecessarily.
I implemented this now, and removed fsckd in the progress. The
progress data is now available on /run/systemd/fsck.progress which
should be an AF_UNIX/SOCK_STREAM socket. If you listen on it you will
get the raw fsck progress data though it. With SO_PEERCRED you can
figure out which fsck process is on the other side. If you do not
listen on it the progress data is instead printed to /dev/console
after converting it to percentage data.
Please test this, I only did some artifical testing myself, since I
don't use file systems that require fsck anymore myself.
Sorry again for communicating this so badly initially!
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list