Btrfsctl
From btrfs Wiki
The main control program is used for managing subvolumes, snapshots and more.
Usage
btrfsctl [-d <file>|<dir>] [-s <snap> <sub>] [-S <sub> <tree>] [-r <size>] [-A <device>] [-a] [-c] [<device>]
Description of parameters
- "-d <name>": defragments the given file or the whole directory
- "-s <snap> <sub>": creates a new snapshot of "vol"
- "-S <sub> <tree>": creates a new subvolume
- "-r [+-]size[gkm]": resize the FS by size amount
- "-A device": scans the device file for a Btrfs filesystem
- "-a": scans all devices for Btrfs filesystems
- "-c": forces a single FS sync
Examples
Suppose your Mountpoint is /mnt:
add 2GB to the FS
btrfsctl -r +2g /mnt
shrink the FS by 4GB
btrfsctl -r -4g /mnt
Explicitly set the FS size
btrfsctl -r 20g /mnt
Use 'max' to grow the FS to the limit of the device
btrfsctl -r max /mnt
