BTRFS – How to Make Free Space Available After Resize

btrfsfilesystemslinuxshrink

I'm trying to shrink BTRFS partition and create new EXT4 partition with that free space.

I did btrfs filesystem resize -5g /

Now I have this (notice Device slack equals what I shrinked):

orangepiplus2e:~:# btrfs device usage /
/dev/mmcblk2p2, ID: 1
   Device size:            14.15GiB
   Device slack:            5.00GiB
   Data,single:             7.66GiB
   Metadata,single:       768.00MiB
   System,single:          32.00MiB
   Unallocated:           725.00MiB

How can I free that 5 GB of Device slack to use? Google didn't help me out.

Best Answer

@Gerald Schneider is right. I had to resize partition too. Thank you!

parted /dev/mmcblk2
(parted) resizepart
Partition number? 2
End?  [15.5GB]? 9.9GB