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.

3 Answers 3


Maybe this explains ( from the btrfs wiki by the way )

A subvolume in btrfs is not the same as an LVM logical volume or a ZFS subvolume. With LVM, a logical volume is a block device in its own right (which could for example contain any other filesystem or container like dm-crypt, MD RAID, etc.) - this is not the case with btrfs. A btrfs subvolume is not a block device (and cannot be treated as one) instead, a btrfs subvolume can be thought of as a POSIX file namespace. This namespace can be accessed via the top-level subvolume of the filesystem, or it can be mounted in its own right.

see also https://btrfs.wiki.kernel.org/index.php/FAQ

Interaction with partitions, device managers and logical volumes

Btrfs has subvolumes, does this mean I don't need a logical volume manager and I can create a big Btrfs filesystem on a raw partition?

There is not a single answer to this question. Here are the issues to think about when you choose raw partitions or LVM:

  • Performance
    • raw partitions are slightly faster than logical volumes
    • btrfs does write optimisation (sequential writes) across a filesystem subvolume write performance will benefit from this algorithm creating multiple btrfs filesystems, each on a different LV, means that the algorithm can be ineffective (although the kernel will still perform some optimization at the block device level)
  • Online resizing and relocating the filesystem across devices: the pvmove command from LVM allows filesystems to move between devices while online
    • raw partitions can only be moved to a different starting cylinder while offline
    • raw partitions can only be made bigger if there is free space after the partition, while LVM can expand an LV onto free space anywhere in the volume group - and it can do the resize online
  • subvolume/logical volume size constraints
    • LVM is convenient for creating fixed size logical volumes (e.g. 10MB for each user, 20GB for each virtual machine image, etc)
    • subvolumes don't currently enforce such rigid size constraints, although the upcoming qgroups feature will address this issue

.... the FAQ continues to explain the scenario's in which LVM+BTRFS make sense

  • 1
    Thanks, I understand now the key differences. 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.
    – r0berts
    Commented Aug 23, 2016 at 10:07

The other answer here has a "Well Duh!" quality to it. LVM takes a set of block devices and presents the system with a new (LV) block device with a fixed mapping to physical blocks. It's rigid and inflexible. BTRFS is an actual file-system. Comparing the two is a semi-futile exercise.

ZFS & BTRFS (and maybe BCACHEFS) present an entirely new and generally superior paradigm. ALL the block devices in the fs share free-blocks. 'df' on a subvolume is nearly meaningless. The "subvolumes" can share data and metadata blocks! Creating a BTRFS snapshot or 'cp from one subvol to another means changing a few blocks of meta-data = instantaneous.

LVM supports the rather silly and simplistic notion of fixed "partitions" to support old-vintage file-systems. Re-arranging the LV & FS sizes is a task that is totally subsumed in BTRFS or ZFS.

  • What a simplistic view, calling every file system which isn't ZFS or btrfs "legacy". There is a very simple and common use case for shared block-level devices, and it's called VMs. This even applies if the guest OS is again using btrfs on its own. That's where thing provisioning, LVM and VDO really shine. Commented Jun 29 at 12:40

I found one use case for putting BTRFS on top of LVM. When you need different compression settings for different volumes, for example:

  • ZSTD:3 - for common files;
  • ZSTD:6 - for backups;
  • No compression - for video files, database, etc;

Currently compression level could be set for entire BTRFS filesystem only, not for each subvolume. So in this case, you will end up with 3 LVs: each will have separate BTRFS with different settings. But keep in mind, if you need shrink/extend some of these BTRFS volumes, you need to do it manually: first shrink BTRFS, then shrink LV.(same for extend). Also if you need redundant BTRFS, then LVs must be created on both physical disks, then added to BTRFS as LVs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .