Split a Drive into Multiple Partitions And Format Them as Ext4 and Btrfs
Premium Challenge
Upgrade your membership to unlock this and all other premium materials.
This challenge builds upon the basic GPT partitioning challenge by introducing multiple partitions with different filesystems.
Real-world servers often need their storage divided for different purposes: fast, journaled filesystems like ext4 for logs and system data, and advanced filesystems like btrfs for application data that benefits from features like snapshots, compression, and copy-on-write semantics.

Device names on the diagram are deliberately generic.
Your mission is to:
- Create a GUID partition table (GPT) on the blank 40 GiB drive.
- Add a first partition of exactly 10 GiB for log storage.
- Add a second partition using the remaining ~30 GiB for data storage.
- Format the first partition as
ext4and mount it at/var/log/acme. - Format the second partition as
btrfsand mount it at/var/lib/acme. - Write test files:
service.login the logs partition anddataset.txtin the data partition.
Hint: Finding the blank drive
Use lsblk or fdisk -l to identify the unpartitioned drive. Look for a device with no existing partitions or filesystems.
Hint: Partition sizing in parted
When creating partitions with parted, you can specify exact sizes like 0% 10GiB for the first partition, then 10GiB 100% for the second. The tool handles the math automatically.
Hint: Kernel partition updates
After creating partitions, you need to make the kernel aware of the new partition table before formatting.
The best tool for this job is partx -u.
Hint: Installing btrfs tools
You'll need btrfs-progs to format and manage btrfs filesystems:
sudo apt-get update
sudo apt-get install btrfs-progs
Hint: Creating mount directories
Don't forget to create the mount point directories before trying to mount the partitions.