Bug#1057417: systemd tmpfiles seems to delete lost+found again

Michael Biebl biebl at debian.org
Mon Dec 4 21:52:59 GMT 2023


On Mon, 4 Dec 2023 20:39:21 +0100 Axel Scheepers 
<axel.scheepers76 at gmail.com> wrote:
> On Mon, Dec 4, 2023 at 8:27 PM Luca Boccassi <bluca at debian.org> wrote:
> > But the main point is, it's fine if you do a custom local setup with
> > the appropriate local configuration, but then you also need to add the
> > appropriate config for tmpfiles.d. You can either mask or replace
> > tmp.conf, simply add your own file as /etc/tmpfiles.d/tmp.conf and it
> > will have priority, and do what you need for your custom local setup.
> 
> Oh, ok. I admit I have a traditional unix background where it's common
> practice to have these a separate real partitions instead. I'll just keep
> the exception I already made then. I have some users on the system
> which sometimes store larger things in there.

debian-installer offers a partition setup with separate /home, /var and 
/tmp very prominently (see attached screenshot).

Whether this is still a good idea nowadays is debatable.
As Luca said, if we offer /tmp as a separate partition, it should 
probably be tmpfs now and not an (ext4/xfs/...) partition.

For reference, I also include the legacy cleanup routine for SysV:
https://salsa.debian.org/debian/sysvinit/-/blob/master/debian/src/initscripts/lib/init/bootclean.sh#L119-128

So if there should be an exclusion for lost+found (for ext4), there 
should probably also be exclusion for quota related files.

Whether those exclusions should be shipped directly by systemd or 
created by d-i (as suggested by Luca on IRC), is something I don't have 
a strong opinion about. The downside of letting d-i create such a 
tmpfiles snippet is that we wouldn't cover existing systems.

As for d-i itself, my preferred solution for this would be to change it 
to uses tmpfs for /tmp.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245465
(that's an old bug report)


Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 56963 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20231204/746f36d2/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20231204/746f36d2/attachment-0001.sig>


More information about the Pkg-systemd-maintainers mailing list