This is OpenSUSE Leap 42. I have a computer with 2x 500 GB SATA HDD drives and to speed it up I put in a small 30GB SSD drive for the system. During installation HDDs were disconnected as they confused the installer (and me). Once system was up I quite easily exchanged the /home directory for a XFS logical volume (I use LVM primarily to add space easily). Then /opt filled up (chrome and botanicula) and I wanted to put that on a volume on HDD. So I created a volume and formatted it with BTRFS. After some head scratching - the @ subvolumes
in fstab made me read up on BTRFS I did what I needed - /opt now is 100 GB in size.
But the question is: Does it make sense to format a LVM volume with btrfs? Essentially they both are volume handling systems.
For illustration I paste my fstab (# comments show my edits) and vgscan + lvscan output:
~> cat /etc/fstab
UUID=1b511986-9c20-4885-8385-1cc03663201b swap swap defaults 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af / btrfs defaults 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /boot/grub2/x86_64-efi bt
rfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=3e103686-52e9-44ac-963f-5a76177af56b /opt btrfs defaults 0 0
#UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /opt btrfs subvol=@/opt 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /srv btrfs subvol=@/srv 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /tmp btrfs subvol=@/tmp 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /usr/local btrfs subvol=@/usr/local 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/crash btrfs subvol=@/var/crash 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/log btrfs subvol=@/var/log 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/opt btrfs subvol=@/var/opt 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/spool btrfs subvol=@/var/spool 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=30e20531-b7f1-4bde-b2d2-fab8eeca23af /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=c4c4f819-a548-4881-b854-a0ed62e7952e /home xfs defaults 1 2
#UUID=e14edbfa-ddc2-4f6d-9cba-245d828ba8aa /home xfs defaults 1 2
~>
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "r0data" using metadata type lvm2
Found volume group "r0sys" using metadata type lvm2
# lvscan
ACTIVE '/dev/r0data/homer' [699.53 GiB] inherit
ACTIVE '/dev/r0sys/optr' [100.00 GiB] inherit
After the answer: Thanks, I understand now the key differences. To me LVM is indeed better for managing space with whatever filesystems on top of it, but BTRFS should be used for features specific to it - mainly snapshots. In simple home network use it is probably better to stay away from it. I've had too much grief managing space on a small drive, but I'd imagine space would be eaten away also on big drives.