Reply to post: Re: Thinks I like about systemd

Systemd 249 release candidate includes better support for immutable OSes and provisioning images

Doctor Syntax Silver badge

Re: Thinks I like about systemd

"/var/tmp is for stuff that should survive a reboot."

Do not rely in this

I'd never done an install without reformatting the partition holding /var until the other day when I decided to test this notion. It failed due to a permission error citing a non-existent user name. In Debian-based systems at least, /var includes a lot of stuff relating to the installation. Admittedly the error came with an explanation that it may be a packaging error but the fact remains that the installation process is likely to have been designed assuming an empty directory.

If, by intent or bad luck, your reboot involves a reinstall your vital stuff in /var/tmp or anything else in /var cannot rely on its survival. Given that Apache and MySQL default to placing user data there it's safest to make their directories symlinks to real directories elsewhere such as /srv. Assume /var is for system stuff only.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon