archive mirror
 help / color / mirror / Atom feed
@ 2021-05-01 15:01 Giuseppe Della Bianca
  0 siblings, 0 replies; only message in thread
From: Giuseppe Della Bianca @ 2021-05-01 15:01 UTC (permalink / raw)
  To: linux-bcache


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
rm 7
mkpart logical btrfs 574412038144B 575491014655B


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
rm 7
mkpart logical 574412029952B 585151545343B


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-01 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 15:01 [BACKING DEVICE] Resize Giuseppe Della Bianca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).