Resizing btrfs filesystems

With btrfs, it's possible to resize the btrfs filesystem when it is online and is being accessed by users. The size of a filesystem will grow automatically if we add or remove devices; we will see this in the next subsection of this chapter; however; we can resize the filesystem should we need to even on a single device that we have created. Using the following command, we will shrink the assigned space to the filesystem by 500MiB:

# btrfs filesystem resize -500m /data/simple

If we check the size of the filesystem before and after, we can see the dynamic change that takes place:

Resizing btrfs filesystems

Get Learning RHEL Networking now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.