This episode covers storage on Void: choosing between ext4, XFS, and Btrfs with snapshots, using LVM for partition flexibility, and encrypting disks with LUKS and dm-crypt integrated with the dracut initramfs.

Storage is the foundation of all your data. Episode 10 covers the filesystem choices on Void — ext4, XFS, Btrfs — plus LVM for flexibility, and ends with full-disk encryption using LUKS and dm-crypt. Decisions in this episode can rarely be reversed without a reinstall, so understand them well.
Void handles storage in the standard Linux way, but there are a few special notes, such as encryption integration with the dracut initramfs and clean snapshot support through Btrfs's built-in tools.
Let's start with choosing a filesystem.
ext4 is the most battle-tested default Linux filesystem. Stable, supported by all tools, and very hard to cause trouble with. For production servers that prioritize reliability over experimentation, ext4 is the wisest choice.
Create an ext4 filesystem:
sudo mkfs.ext4 -L root /dev/sda3The mkfs.ext4 -L root /dev/sda3 command formats the /dev/sda3 partition with the label root. Adjust the partition path to match your scheme.
XFS excels at high throughput and handling large files, and is a favorite in many storage workloads. However, XFS can't be shrunk, so make sure the partition size is final from the start.
Btrfs brings modern features: snapshots, subvolumes, compression, and data checksums. It suits those who want fast rollbacks, as we'll practice in episode 16.
Create a Btrfs filesystem:
sudo mkfs.btrfs -f -L root /dev/sda3
sudo mount /dev/sda3 /mnt
sudo btrfs subvolume create /mnt/@rootThe btrfs subvolume create /mnt/@root command creates the @root subvolume — a common pattern to keep snapshots and rollbacks tidy.
LVM (Logical Volume Manager) separates physical storage from logical volumes. You can add, move, and shrink volumes without touching partitions — very useful on servers whose capacity keeps growing.
Its workflow:
Physical Volume (PV) -> Volume Group (VG) -> Logical Volume (LV)The basic steps for creating LVM:
sudo pvcreate /dev/sda3
sudo vgcreate vg0 /dev/sda3
sudo lvcreate -L 20G -n root vg0The lvcreate -L 20G -n root vg0 command creates a root logical volume of 20 GB in the vg0 volume group. After that, format and mount as usual.
LVM's advantage shows up when capacity runs low:
sudo lvextend -L +10G /dev/vg0/root
sudo resize2fs /dev/vg0/rootAfter lvextend, resize2fs grows the ext4 filesystem to the new size. On an XFS filesystem, use xfs_growfs instead.
Full-disk encryption with LUKS and dm-crypt protects your data when a device is lost or stolen. Without the passphrase, the data inside can't be read. This is a must for laptops and servers carrying sensitive data.
Create an encrypted volume and format inside it:
sudo cryptsetup luksFormat /dev/sda3
sudo cryptsetup open /dev/sda3 cryptroot
sudo mkfs.ext4 /dev/mapper/cryptrootThe cryptsetup luksFormat /dev/sda3 command initializes LUKS and asks for a passphrase. After being opened with cryptsetup open, the partition appears as /dev/mapper/cryptroot.
To let the system boot from an encrypted disk, register the device mapper and add the dracut hook:
sudo xbps-install -S cryptsetup
sudo vim /etc/dracut.conf.d/encrypt.confAdd the line add_dracutmodules+=" crypt " to /etc/dracut.conf.d/encrypt.conf, then regenerate the initramfs:
sudo dracut --forceAfter regeneration, the initramfs will ask for the passphrase before the root filesystem is mounted.
After all the configuration, verify the active storage layers:
df -h /
lsblkThe output of lsblk shows the device hierarchy: physical partitions, LUKS or LVM mappers, down to filesystems. Reading this output is a very useful troubleshooting skill.
Episode 10 covered Void storage from filesystem choices — stable ext4, XFS fast for large files, and Btrfs with snapshots — to LVM for volume flexibility and LUKS/dm-crypt for full-disk encryption.
Key takeaways:
@root to keep rollbacks tidy.lsblk is the main tool for viewing the storage hierarchy.In the next episode, episode 11, we will cover kernel and firmware — the differences between the linux, linux-lts, and linux-zen kernels, building a custom kernel, understanding the dracut initramfs, and installing linux-firmware and Intel or AMD microcode.