G Giuseppe Della Bianca #
Message details and related content
Hi.
This is the procedure I used for resize one backing device with btrfs filesystem from 1 to 10 GB.
The technique used is
- Move the start of the partition forward (offset 8192) and set the partition type.
- Perform the resize.
- Move back the beginning of the partition and reset the partition type.
Backup data!!
The backing device /dev/sdc7 is a last logical partition with btrfs filesystem.
Stopping bcacheX device and/or unregister /dev/sdc7 backing device.
With bcache show verify that the device is no longer in use.
parted /dev/sdc unit B print
7 574412029952B 575491014655B logical
bd 0 574412029952B 575491014655B logical
fs 8192 574412038144B 575491014655B logical btrfs
parted /dev/sdc
unit B
print
rm 7
mkpart logical btrfs 574412038144B 575491014655B
quit
reboot
gparted resize partition
parted /dev/sdc unit B print
7 574412038144B 585151545343B logical btrfs
fs 8192 574412038144B 585151545343B logical btrfs
bd 0 574412029952B 585151545343B logical
parted /dev/sdc
unit B
print
rm 7
mkpart logical 574412029952B 585151545343B
quit
gdb