Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After shrinking a BTRFS file system using "btrfs filesystem resize /mnt -20g", this space doesn't show up as free for allocation in GParted. It doesn't seem like GParted can resize the btrfs partition on its own either. Rebooting doesn't help.

The various ways to check freespace on a btrfs volume https://btrfs.wiki.kernel.org/index.php/FAQ#Why_are_there_so_many_ways_to_check_the_amount_of_free_space.3F do show that the total space has shrunk by 20 GB.

How can I reclaim this space to use for another new partition on the hard disk?

share|improve this question

1 Answer 1

Thanks to help from cwillu and mig at freenode, I figured out the solution. The btrfs filesystem resize command just like resize2fs resizes the filesystem, but keeps the partition limits unchanged. These can be changed using the fdisk to delete the btrfs partition and then recreating it with an endpoint which is slighty less than 20Gb smaller than the current endpoint, since the freespace is at the end. Run btrfsck to ensure everything is fine, otherwise revert back to the previous partition table. There are many tutorials on the web on this process.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.