How to resize lvm physical disk device after migration to larger drive?

Hello,

I have recently bought a larger ssd drive and migrated to it. I simply cloned the original ssd drive with dd and I could boot to the new drive perfectly. My fdisk outpout as follows.

sda1 is boot fat32
sda2 is efi fat32
sda3 basically lvm controlled device. I want sda3 to expand to the rest of the device.

sudo fdisk -l 

GPT PMBR size mismatch (234441647 != 937703087) will be corrected by write.

The backup GPT table is not on the end of the device.
Disk /dev/sda: 447,13 GiB, 480103981056 bytes, 937703088 sectors
Disk model: KIOXIA-EXCERIA S
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: gpt
Disk identifier: 3DAA5080-18BC-4928-AC54-ADEEF8C85D54

Device       Start       End   Sectors  Size Type
/dev/sda1     2048   1050623   1048576  512M Microsoft basic data
/dev/sda2  1050624   1574911    524288  256M EFI System
/dev/sda3  1574912 234436511 232861600  111G Linux filesystem


Disk /dev/mapper/vg1-lvhome: 60 GiB, 64424509440 bytes, 125829120 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


Disk /dev/mapper/vg1-lvswap: 8 GiB, 8589934592 bytes, 16777216 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

Disk /dev/mapper/vg1-lvroot: 30 GiB, 32212254720 bytes, 62914560 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

How can I extend the lvm drive which sda3 to encompass the rest of the disk device?

Any help much appreciated.

Standard procedure is using GParted from a live iso boot. But this does not cover encrypted partitions I guess.

Can you post the output of the commands below to get a better picture of your environment?
sudo parted -l
sudo lsblk --all
sudo pvdisplay
sudo vgdisplay

@Wollie, @El_Brujo Thank you for responding.

I have found following link adding larger disk to lvm which step by step describes what to do.

I have successfully enlarged old drive (120gb) to (480gb) ssd drive based on the direction in that link.

Again thank you for responding.

1 Like

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