What is the purpose/reasoning/technical-reason why my opensuse tumbleweed system has so many folders of my filesystem "wrapped" (not sure if that's the right word) as sub volumes on btrfs?
Does it have something to do with btrfs snapshots?
Many of the entries are subdirectories of /var
, and then my home directory is mapped in fstab as xfs. What is the reason for these two filesystem types? I suspect that it has something to do with the fact that btrfs can "revert" failed system updates using its snapshots, but I don't understand why not just create a tiny non-btrfs filesystem and mount it on /var?
Besides lots of /var directories, it seems /opt
/src
and /tmp
have subvolume entries. Here is a complete unmodified factory-defaults-only fstab from my tumbleweed system.
Besides the usual SWAP and the / which is btrfs, what is surprising to me is the sheer volume of subvolumes.
UUID=fd443d26-5ded-4f57-a51e-824eec3d2199 swap swap defaults 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 / btrfs defaults 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /opt btrfs subvol=@/opt 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /srv btrfs subvol=@/srv 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /tmp btrfs subvol=@/tmp 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /usr/local btrfs subvol=@/usr/local 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/crash btrfs subvol=@/var/crash 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/log btrfs subvol=@/var/log 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/opt btrfs subvol=@/var/opt 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/spool btrfs subvol=@/var/spool 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=7126f15f-0443-4e1d-b74e-406266534887 /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=edf9aa3f-621f-40d2-9e7a-433b50673642 /home xfs defaults 1 2
mailman
changes without it impacting yourmariadb
or bind installs. Another part of this is that you're apparently running several different daemons (bind, mailman, libvirt, mysql, mariadb, etc. Adding those adds about six lines to it by itself. Their install probably adds quite a few subvolumes but it appears to be longer because you also have a lot going on.