3 ms·
"systemd-tmpfiles –purge" will delete /home in systemd 256
- westurner 2y agoWhy? man systemd-tmpfiles https://www.freedesktop.org/software/systemd/man/latest/systemd-tmpfiles.html https://www.freedesktop.org/software/systemd/man/latest/syst... man tmpfiles.d https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html https://www.freedesktop.org/software/systemd/man/latest/tmpf...
- dhx 2y ago/home is specified as a path to create if it doesn't already exist.[1] Despite the name "tmpfiles", there is nothing necessarily temporary about /home being created.[2] Think of a system such as a mobile phone that has an read-only system partition always present, and on first boot of the system, /home is automatically created. /home is effectively considered to be "temporary" until the next "factory reset". The --purge command is deliberately meant to revert this temporarily created state by destroying /home and effectively returning the system back to just a read-only system partition.[3] [1] https://github.com/systemd/systemd/blob/main/tmpfiles.d/home.conf https://github.com/systemd/systemd/blob/main/tmpfiles.d/home... [2] https://github.com/systemd/systemd/pull/33354 https://github.com/systemd/systemd/pull/33354 [3] https://github.com/systemd/systemd/issues/33349 https://github.com/systemd/systemd/issues/33349
- westurner 2y agoWhy doesn't it delete /mnt, and /run/media, too?
- dhx 2y agoMountpoints are explicitly/hardcoded to never be umountable and removable via tmpfiles.d specification.[1] Possibly because such mountpoints are generally expected to be systemd .mount units, and as such unmounting and removal of paths would be tied in with systemd unit handling, rather than systemd tmpfiles.d handling? I suppose one could still create tmpfiles.d configuration file that handles files within a fixed mountpoint of /mnt/alwaysmounted/tmp/ as I couldn't see anything in tmpfiles.c[1] at a quick glance that would prevent this occurring. [1] https://github.com/systemd/systemd/blob/main/src/tmpfiles/tmpfiles.c#L2683 https://github.com/systemd/systemd/blob/main/src/tmpfiles/tm... [2] https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html https://www.freedesktop.org/software/systemd/man/latest/syst...
- JSDevOps 2y agoA welcome decision by all
- frankjr 2y agohttps://github.com/systemd/systemd/issues/33349 https://github.com/systemd/systemd/issues/33349 https://github.com/systemd/systemd/pull/33383 https://github.com/systemd/systemd/pull/33383
- JohnFen 2y ago> I talked about this on #debian-next, and seems that this is not a bug, but a feature, as systemd-tmpfiles also handles autocreating data directories such as /home, and the --purge flag is meant to wipe them clean. What?? That seems insane to me. It may make sense to systemd devs, but it couldn't be more counterintuitive. I could see myself easily falling into the same trap.
- frankjr 2y agoIt is counterintuitive and they're changing it. https://github.com/systemd/systemd/pull/33353#issuecomment-2172696221 https://github.com/systemd/systemd/pull/33353#issuecomment-2...