Your Linux Data Center Experts

ext3 has been able to grow the file-system size while it's mounted and active for quite a while, but has always had to be unmounted to be shrunk. btrfs now seems to support growing and shrinking online:

root@test1:/data/test1# btrfs filesystem resize -100G .
Resize '.' of '-100G'
root@test1:/data/test1# df -h .
Filesystem            Size  Used Avail Use% Mounted on
-                     347G  364M  346G   1% /data/test1
root@test1:/data/test1# btrfs filesystem resize +100G .
Resize '.' of '+100G'
root@test1:/data/test1# df -h .
Filesystem            Size  Used Avail Use% Mounted on
-                     447G  364M  446G   1% /data/test1
root@test1:/data/test1#

So, you could use LVM and create different partitions for / and /var and /home and /usr and /tmp, without having to worry about sizing them correctly the first time. It would be easy to shrink one and increase another… Typically you'd just create one btrfs pool with a subvolume for the other file-systems – though that won't limit one subvolume from growing and using all space. There's no equivalent to the file-system limits like with ZFS.

comments powered by Disqus

Join our other satisfied clients. Contact us today.