Is resizing a btrfs partition safe?

This is my current partition configuration

Disk /dev/sda: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x34fe34fd

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1              63 205404159 205404097    98G  7 HPFS/NTFS/exFAT
/dev/sda2       205404160 407547903 202143744  96,4G  7 HPFS/NTFS/exFAT
/dev/sda3  *    407547904 976773167 569225264 271,4G  5 Extended
/dev/sda5       407549952 448515638  40965687  19,5G 83 Linux
/dev/sda6       448518144 974725119 526206976 250,9G 83 Linux
/dev/sda7       974727168 976773119   2045952   999M 82 Linux swap / Solaris


sda5 is the Root partition, in btrfs format, while sda6 is the Home, in ext4 format.

Now I’m starting to experience the full-disk problem related to Snapper backups, and I’m considering to expand the Root partition to overcome it.

I’ve already managed partitions before, but this is the first time that I need to manipulate a btrfs, so I need some advices.

First of all, how much space will I realistically require to give to the Root partition? Filelight shows me that without considering Snapper snapshots my Root partition sizes about 9~10 GB.

Then, to increase the Root partition, I first have to resize and move the Home, the enlarge the Root. I’m pretty confident about resizing ext4 partitions, I’ve already done this before, but with btrfs I’ve no experience. Should I consider it stable as ext4, or it can cause more problems?

Of course I keep regular backups of all the important data, and usually before I have to work with partitions I fully backup them with Clonezilla, just in case.

Same as any other there is always sum risk in removing partitions so have a backup plan. You need to do it with the 42 rescue disk donn’t use any other version.

You need 40 gig min for BTRFS BTW default is XFS for home unless you changed it or upgraded and kept home.

Could you elaborate on the procedure/app to expand a Tumbleweed BTRFS partition? Gparted can handle XFS - my /home - but not BTRFS - /.
I can shrink /home, and even move it since I have free space on my SSD due to overprovisioning. (/ is sda8; /home is sda9, and there is 25 GB unused ovderprovisioning space following sda9. The partitions ahead are two Linux Mint 17.3 installs, Mate and KDE.)

Expand partition and then resize filesystem. There is no need to use any fancy GUI for it. fdisk followed by “btrfs filesystem resize max /path/to/mounted/partition” should be enough.

Gparted can handle XFS - my /home …
I can shrink /home

You can’t. It is impossible to shrink xfs. You can backup, recreate and restore.

Hi sekhemty,

Shrink the ext4 home-partition at the end. No need to move it.

Then you create a new raw, unformatted partition /dev/sdax of the empty space. Be aware that the numbering of the swap partition will change! Check your /etc/fstab and /boot/grub2/grub.cfg for any occurrence.

Then add the new partition to your root.

# btrfs device add /dev/sdax /

This works online and will format the additional space. After that balance the 2 devices

# btrfs balance start /

Best regards,
Bequimão

Do not forget that multiple devices btrfs is not supported by YaST Partitioner tool.