Is it safe to resize BTRFS partition?

I’m curious if it’s safe to resize btrfs partition. I have my /root and /home on the same one and I’m wondering if it’s safe to resize them, if I’ll need to change swap partition size.
What are the downsides?

Resizing partitions always involves a risk of data loss.

I found that info too, but I’m hoping someone will give a more detailed answer on how big the risks are, maybe how to reduce them, etc.

Instead of a swap partition, you could use a swap file and drop the old partition.

Yes, it’s safe. Any perfectly executed partition resizing is safe. GParted and any other partition managers based on the same library will do preliminary check if the resize is doable or not and will tell you if it’s not, BUT it doesn’t take into account any power failure and other unexpected things. I’ve resized EXT4, BTRFS, FAT32, ExFAT and NTFS through my computing life.

It is possible, and i have done it several times.

shrinking a volume:

  1. shrink the filesystem with btrfs-command
  2. shrink the partition with parted

expanding a volume:

  1. expand the partition with parted
  2. expand the filesystem wit btrfs-command

This is not for anxious people.

  • btrfs may need a balance before shrinking
  • don´t shrink to small ! keep 20% unallocated !
  • be aware that parted and btrfs calculate sizes very different

You may use gparted to do this. But i have heard of problems with other graphical tools

You find good Information about Btrfs in the wiki

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.