1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
Commit Graph

10 Commits

Author SHA1 Message Date
Lennart Poettering
822cd60135 tmpfiles.d: change all subvolumes to use quota
Let's make sure the subvolumes we create fit into a sensible definition
of a quota tree.
2015-10-22 01:59:25 +02:00
Lennart Poettering
770b5ce4fc tmpfiles: automatically remove old machine snapshots at boot
Remove old temporary snapshots, but only at boot. Ideally we'd have
"self-destroying" btrfs snapshots that go away if the last last
reference to it does. To mimic a scheme like this at least remove the
old snapshots on fresh boots, where we know they cannot be referenced
anymore. Note that we actually remove all temporary files in
/var/lib/machines/ at boot, which should be safe since the directory has
defined semantics. In the root directory (where systemd-nspawn
--ephemeral places snapshots) we are more strict, to avoid removing
unrelated temporary files.

This also splits out nspawn/container related tmpfiles bits into a new
tmpfiles snippet to systemd-nspawn.conf
2015-06-15 19:28:55 +02:00
Lennart Poettering
fed2b07ebc tmpfiles: make /home and /var btrfs subvolumes by default when booted up with them missing
This way the root subvolume can be left read-only easily, and variable
and user data writable with explicit quota set.
2015-04-21 17:43:55 +02:00
Lennart Poettering
5f129649b9 nspawn,machined: change default container image location from /var/lib/container to /var/lib/machines
Given that this is also the place to store raw disk images which are
very much bootable with qemu/kvm it sounds like a misnomer to call the
directory "container". Hence, let's change this sooner rather than
later, and use the generic name, in particular since we otherwise try to
use the generic "machine" preferably over the more specific "container"
or "vm".
2015-01-15 01:47:21 +01:00
Lennart Poettering
814f000872 tmpfiles.d: upgrade a couple of directories we create at boot to subvolumes
In particular we upgrade /var/lib/container, /var/tmp and /tmp to
subvolumes.
2014-12-28 02:08:40 +01:00
Martin Pitt
f148ae1489 tmpfiles.d: Fix directory name
The .service uses "/var/lib/container", not "containers".
2014-11-25 11:39:30 +01:00
Martin Pitt
797e7a51cd tmpfiles.d: Create /var/lib/containers
Create /var/lib/containers so that it exists with an appropriate mode. We want
0700 by default so that users on the host aren't able to call suid root
binaries in the container. This becomes a security issue if a user can enter a
container as root, create a suid root binary, and call that from the host.
(This assumes that containers are caged by mandatory access control or are
started as user).
2014-11-21 00:34:26 +01:00
Lennart Poettering
7613d0aec9 tmpfiles: remove line for automatic clean-ups for /var/cache/man/
Management of /var/cache/man should move to the distribution package
owning the directory (for example, man-db). As man pages are a
non-essential part of the system and unnecessary for minimal setups,
there's no point in having systemd ship these lines.

Distribution packages should make sure the appropriate package for their
distribution adopts this line. Ideally, the line is adopted by the
upstream package.

For Fedora I have filed this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1110274
2014-06-17 13:00:39 +02:00
Lennart Poettering
1ebab2103d tmpfiles: if /var is mounted from tmpfs, we should adjust its access mode 2014-06-11 09:20:17 +02:00
Lennart Poettering
9339db7187 tmpfiles: always recreate the most basic directory structure in /var
Let's allow booting up with /var empty. Only create the most basic
directories to get to a working directory structure and symlink set in
/var.
2014-06-11 00:12:21 +02:00