The B-tree file system (Btrfs) is a type of file system with a copy-on-write principle and a logical volume manager. Originally developed to address the lack of snapshots, integrity checking, data scrubbing, and other features within existing Linux file systems, Btrfs differs from other file systems, particularly with its ability to create subvolumes. ZFS does have something similar with datasets and snapshots, though this is an interesting implementation that makes Btrfs fairly versatile. Let's look at how subvolumes differ from conventional partitions.
5 It's a logical division of a storage drive
This changes everything
Unlike a partition that physically or virtually splits a drive, a Btrfs subvolume is entirely logical. It's located within the Btrfs filesystem, whereas a new partition can have its own separate filesystem. This completely changes how one creates, mounts, and interacts with the subvolume, compared to a normal partition. Whether this is an advantage or a drawback of Btrfs depends on how you intend to use the subvolume to store data.
It's also easier to create and delete subvolumes, whereas you need to exercise a healthy dose of caution when managing partitions, since everything can go wrong. Being at the software level, Btrfs subvolumes are easier to work with and can be dynamically adjusted depending on what the storage volumes need to be used for.
5 ways ZFS is superior to Btrfs for storing data
ZFS vs Btrfs? Check how ZFS is better in handling and storing your data than Btrfs
4 You don't need a tool to create one
Unlike partitions
To create a Btrfs subvolume, all you need to do is run the command btrfs subvolume create /mnt/new-subvolume. That's it! For partitions on other filesystems, you'll need to use specific tools and third-party software if the functionality is not available within the filesystem or operating system. For instance, on Linux, macOS, or Windows, you'll need to use something like fdisk, gdisk, or gparted to get the job done.
And this is done on the fly. There's no need to unmount the drive to create a Btrfs subvolume, nor is there any risk of accidentally deleting data through resizing.
4 underrated alternatives to TrueNAS Scale and Unraid for NAS lovers
The NAS rabbit hole hides plenty of niche distros
3 It can span multiple drives
I bet your partition can't do that!
Should Btrfs be configured across multiple storage drives, a subvolume can span beyond physical limitations due to its logical nature. Sure, partitions can physically span multiple drives, but you need to use an underlying technology to achieve this, namely ZFS or RAID. This pools the drives together to create a single device for the partitions to be created on. So while they are spanning multiple drives, it's technically only one drive.
Btrfs is completely different in that it almost acts like its own RAID when used with multiple drives. Data is distributed throughout the array and redundancy as well as balancing are all automatically handled by the filesystem. That's where subvolumes come in by residing within that Btrfs storage pool. It's a new way of thinking when it comes to storing data since you're not really stashing files on a particular drive.
4 ways to make use of NVME drives in your homelab
Make use of old drives and learn something about filesystems along the way
2 Full snapshot support
Easily restore from an earlier point
Good luck trying to use snapshots for backup and restoration on a filesystem such as NTFS. ZFS is really the only other filesystem with integrated snapshot support. It's why I recommend using ZFS for servers and NAS, making TrueNAS particularly potent for handling the storage of big data. IT's a similar deal for Btrfs but on a desktop, laptop, or other supported device. ZFS could be used, but it's not as light and can be incredibly intimidating for beginners.
ZFS also isn't natively supported on Linux, making Btrfs the go-to choice for those setting up a new distro installation. It's worth noting that snapshots are per subvolume and not system-wide.
5 irreplaceable services my NAS provides that I couldn't live without
I rely on my little box of storage for a lot of things
1 Automatically adjusts on the fly
No need to manually adjust capacities
This is probably my favorite part about Btrfs subvolumes. When creating partitions, you have to carefully calculate or estimate how much space should be allocated from the total drive pool. That's not the same with Btrfs, which dynamically adjusts the size of a subvolume depending on what's stored within. For instance, should you create a new subvolume and move a 100 GB folder into the newly created filesystem, you'll see the subvolume increase in size relative to what's now stored.
It is possible to manually adjust the size of a volume, but the filesystem can handle this without issue and without user input. It's incredibly flexible. There's even the ability to create quota groups to limit how much space each subvolume and user (or service) can use, which is incredibly useful in a multi-user environment or when you require tighter control over resource allocation.
How I use software RAID on Windows to speed up drive access and add redundancy
Storage Spaces on Windows enables a simpler version of software RAID
Btrfs is great for flexible storage
Partitions are like physically splitting up the storage drive, whereas Btrfs subvolumes are akin to using blocks, and these can be resized and dynamically adjusted on the fly. Btrfs is great for a flexible layout and snapshot support for keeping all your data safe. It's great for rolling back versions and taking advantage of stored backups. It's also fantastic for assigning parts of your system for isolation due to performance or some other reason. Partitions have their place, but Btrfs is a sizable upgrade compared to other filesystems.
