You are not logged in.
I just did a new install using the Feb 2022 ISO. I used BTRFS and created just 3 subvolumes: @, @home, and @snapshots.
I've installed snapper, snapper-gui, and grub-btrfs, but have not configured them. I went to checkout the created subvolumes and found this:
[jim@den-pc ~]$ sudo btrfs su list /
ID 256 gen 89 top level 5 path @
ID 257 gen 89 top level 5 path @home
ID 258 gen 10 top level 5 path @snapshots
ID 259 gen 16 top level 256 path var/lib/portables
ID 260 gen 17 top level 256 path var/lib/machines
Who created the var/lib/portables and var/lib/machines subvolumes. How can I get rid of them without messing up something??
Offline
systemd does, via systemd-tmpfiles.
Online
systemd does, via systemd-tmpfiles.
Do you know the reason for their creation? When I start doing snapshots with snapper I want all of root as a snapshot of @. I don't want do have to create a bunch of other snapper configurations to get all of the root directory.
Arch used to not do crap you don't want or need. I don't see anything in the wiki about the need for these subvolumes.
Offline
Offline
That article talks about someone using a copy. My system is a brand new install of Arch with BTRFS on root. I can delete those directories but cannot delete those subvolumes.
It would be nice to know why they are there and if they are important. In December and January the ISO didn't create those subvolumes. So something has changes and not for the better.
I hope this isn't a change in Archlinux philosophy. It use to be Ubuntu who did things they didn't explain and forced on you.
Offline
The last post in that thread says you can delete the subvolumes and create normal directories instead. You could also have figured that out by looking into the tmpfiles mechanism that Scimmia mentioned.
It has apparently been in systemd for years: https://github.com/systemd/systemd/blob … NEWS#L9169
Did you actually have a btrfs-based install before without these subvolumes (and without any manual intervention related to these paths)?
Last edited by Raynman (2022-02-19 16:40:59)
Offline
/var/lib/machines is for systemd-nspawn & machinectl and /var/lib/portables is for systemd-portabled & portablectl.
See https://systemd.io/CONTAINER_INTERFACE/ & https://systemd.io/PORTABLE_SERVICES/ for more on this.
cannot delete those subvolumes
Yes you can:
# btrfs subvolume delete /var/lib/{machines,portables}
To prevent them being re-created at boot use
# touch /etc/tmpfiles.d/{portables,systemd-nspawn}.conf
Jin, Jîyan, Azadî
Offline
/var/lib/machines is for systemd-nspawn & machinectl and /var/lib/portables is for systemd-portabled & portablectl.
See https://systemd.io/CONTAINER_INTERFACE/ & https://systemd.io/PORTABLE_SERVICES/ for more on this.
jbfabernathy wrote:cannot delete those subvolumes
Yes you can:
# btrfs subvolume delete /var/lib/{machines,portables}
To prevent them being re-created at boot use
# touch /etc/tmpfiles.d/{portables,systemd-nspawn}.conf
Thanks, I now have the subvolumes deleted and they didn't get recreated on reboot:
ID 256 gen 267 top level 5 path @
ID 257 gen 267 top level 5 path @home
ID 258 gen 10 top level 5 path @snapshots
I'm not smart enough to understand the links you referenced. Is there a more direct way to know if my removing those subvolumes will mess anything up? This is something completely new to using BTRFS for me. Wasn't an issue in January.
Offline
Do you use systemd-nspawn or portablectl? If not then you won't miss those directories. It is actually possible to use system-nspawn without /var/lib/machines anyway.
Jin, Jîyan, Azadî
Offline
Do you use systemd-nspawn or portablectl? If not then you won't miss those directories. It is actually possible to use system-nspawn without /var/lib/machines anyway.
I do not think I use systemd-nspawn since I do not know what it is. The links you provided talk about containers and virtual machines. I do use Virtualbox and KVM/libvirtd, but I don't think that is what we are talking about here. Generally the only thing I think about with virtual machines is to make user that COW is turned off for the directory that holds the image of the virtual machines root drive.
Offline
systemd-nspawn is often used to build packages in a clean chroot., https://wiki.archlinux.org/title/Develo … ean_chroot
I also think netctl uses it. so you may have been using nspawn without realising it.
Last edited by Lone_Wolf (2022-02-20 14:15:16)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
/var/lib/machines is only used by machinectl and even then it will look elsewhere if the directory does not exist.
Jin, Jîyan, Azadî
Offline