From Fedora Project Wiki
Description
This test case ensures the proper installation and basic functionality of the btrfs-progs utilities for managing and maintaining the Btrfs filesystem.
Setup
- Install a fresh version of Fedora.
- Install the
btrfs-progspackage:sudo dnf install btrfs-progs. - Ensure you have an unallocated disk or partition for testing or are comfortable creating/destroying a Btrfs filesystem on an existing partition (WARNING: this will destroy data).
How to test
- Check the installed version of the Btrfs utilities:
btrfs --version. - Create a Btrfs filesystem on a partition (e.g.,
/dev/sdX):sudo mkfs.btrfs /dev/sdX(replacesdXwith your specific partition/device). - Create a mount point:
mkdir ~/btrfs_mount. - Mount the Btrfs filesystem:
sudo mount /dev/sdX ~/btrfs_mount. - Create a file in the mounted filesystem:
echo "Btrfs test data" > ~/btrfs_mount/test.txt. - Unmount the filesystem:
sudo umount ~/btrfs_mount. - Check the Btrfs filesystem for errors:
sudo btrfs check /dev/sdX.
Expected Results
- The version of the Btrfs utilities should be displayed without errors.
- The Btrfs filesystem should be created successfully without any errors.
- The mount command should complete successfully, and the
test.txtfile should be written to the Btrfs filesystem. - The
btrfs checkcommand should report no errors for the Btrfs filesystem.
Optional
For advanced testing:
- Test creating and managing Btrfs subvolumes using
btrfs subvolume. - Test the
btrfs balancecommand to balance block groups on the Btrfs filesystem. - Check disk usage statistics with the
btrfs filesystem dfcommand. - Experiment with Btrfs RAID configurations using multiple devices.
