[systemd-devel] [Help] Can't log in to homed user account: "No space left on device"

Lennart Poettering lennart at poettering.net
Fri Sep 4 17:45:40 UTC 2020


On So, 23.08.20 06:34, Andrii Zymohliad (azymohliad at protonmail.com) wrote:

> Thanks for taking time to read this far! Is there anything obvious
> here that I can do to fix it? Or any hints where to look?

So as you figured out by now this is due to homed's "discard"
handling. At logout we'll discard all unused blocks by default, and at
login we'll reallocte them. If we can't reallocate them because the
underlying fs doesn't have enough space we currently refuse
login. (This appeared to be the right thing to do, given that the
avoiding "discard" is really about guarantees on IO, and if we can't
give those guarantees its pointless.)

I want to make this a bit smarter:

1. We should probably never refuse login, but simply accept discarding
   in the worst case.

2. We should provide better errors and log messages explaining the
   situation. In particular if we cannot fallocate() the backing
   store, we should log about this loudly somehow.

3. It might be an option to only allow a read-only login when discard
   is off and we cannot fallocate().

4. Most importantly though, we should elastically resize the home dir
   during login, logout and during runtime. Meaning: instead of
   configuring a fixed size for your $HOME (and otherwise only
   explicitly resizing on user request) you'd instead just declare how
   much space on the underlying fs shall stay free and how much inside
   your $HOME and then we'll try to keep things in that range by
   resizing automatically.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list