Resizing a Btrfs File System

You can use the btrfs filesystem resize command to resize a mounted Btrfs file system.

You can use the btrfs command to increase the size of a mounted Btrfs file system if enough space exists on the underlying devices to accommodate the change. You also use the btrfs command to decrease its size, if the file system has enough available free space. Note that running the command doesn't have any effect on the layout or size of the underlying devices.

  • To increase the size of a Btrfs file system by a specified amount, such as 2 GB, run:
    sudo btrfs filesystem resize +2g /mybtrfs1
  • To decrease the size of a Btrfs file system by a specified amount, such as 4 GB, run:
    sudo btrfs filesystem resize -4g /mybtrfs2
  • To specify the size of a Btrfs file system to a specified size, such as 20GB, run:
    sudo btrfs filesystem resize 20g /mybtrfs3