Btrfs – creating, resizing, and monitoring
In this recipe, we will create a new RAIDed Btrfs volume and filesystem, using multiple disks for fault-tolerant storage. We will then add a new LUN, growing the filesystem. We will wrap up by modifying the filesystem to compress the data!
Getting ready
To get started, I added five 10 GB drives to the OS. These will be used to build a new RAID1C4 volume. I can see these new devices by using the fdisk -l
command, grepping for GiB
using the following command:
fdisk -l | grep GiB
The output is seen in the following figure:

Figure 4.5 – fdisk output
Here, we can see that the 10 GB devices are sdb
, sdc
, sbd
, sbe
, and sbf
. We will need this info to make the Btrfs volume.
How to do it…
Now that we know the devices, let’s manually create a RAID1C3 volume. We will use all five devices in a RAID1C3 configuration and name the volume data
.
We will then use the following command...