[systemd-devel] [PATCH] tmpfiles: don't create subvolumes in chroot

Martin Pitt martin.pitt at ubuntu.com
Wed Apr 1 07:02:41 PDT 2015


Lennart Poettering [2015-04-01 15:48 +0200]:
> But why do you say "when it doesn't make sense"? Why do you think this
> doesn't make sense...

As someone who has added hideous workarounds like

|  # old rootfs might contain btrfs subvolumes, remove them
|  subvols=$(btrfs subvolume list -o $LXCDIR/${NAME}/rootfs.old 2>/dev/null | awk "/\/rootfs.old/ {print \$(NF)}") || true
|  for vol in $subvols; do
|      btrfs subvolume delete "/${vol#@}"
|  done
|  rm -rf $LXCDIR/${NAME}/rootfs.old

several times to a project of mine (autopkgtest), and keeps finding
more in e. g. LXC, I must say I agree that creating subvolumes in
things like chroots or LXC containers etc. makes very little sense to
me too. I vaguely see how it's useful for the host's
/var/lib/machines/, but for temporary/guest systemd instances like
chroot or LXC it's nothing but a nuisance.

IMHO subvolumes, like hard disk partitions, are something that the
administrator of a host should create deliberately only. Automatically
created ones just create confusion about "why the heck can't I remove
that directory".. It's roughly equivalent of some random package
messing with your partitions and/or fstab.

So if we could somehow make this conditional on "running on real
iron", that would be a good compromise IMHO.

(I don't have a strong enough opinion to start a real fight here, but
at least chalking up my vote)

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150401/a79309ab/attachment.sig>


More information about the systemd-devel mailing list