I have imaged a smaller drive to a larger drive. I now need to increase the size of the parition/volume group (correct term?). The drive has ~1.6 TiB of unallocated space which I want /dev/sdb3 to use then allocate that increase to /dev/cl/root. Below is some information cobbled together from google searching. The first four pieces are from gparted.
/dev/sdb1 fat16 /boot/efi 200 MiB
/dev/sdb2 ext4 /boot 1.0 GiB
/dev/sdb3 lvm2 pv cl 221.68 GiG
unallocated unallocated 1.60 TiB
$ sudo lvmdiskscan
/dev/sdb1 [ 200.00 MiB]
/dev/sdb2 [ 1.00 GiB]
/dev/sdb3 [ 221.68 GiB] LVM physical volume
/dev/cl/var [ 100.00 GiB]
/dev/cl/swap [ 2.00 GiB]
/dev/cl/root [ 110.00 GiB]
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 1.8T 0 disk
├─sdb2 8:18 0 1G 0 part
├─sdb3 8:19 0 221.7G 0 part
│ ├─cl-swap 253:1 0 2G 0 lvm
│ ├─cl-root 253:2 0 110G 0 lvm
│ └─cl-var 253:0 0 100G 0 lvm
└─sdb1 8:17 0 200M 0 part
$ sudo pvdisplay
--- Physical volume ---
PV Name /dev/sdb3
VG Name cl
PV Size 221.68 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 56749
Free PE 2478
Allocated PE 54271
PV UUID Uohq5b-Ubkr-f51E-y1tf-vfAi-JA06-dKWx7A
I tried to increase physical size by using sudo pvresize /dev/sdb3
with the output of
Physical volume "/dev/sdb3" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
Though this didn't seem to do anything. I can't resize /dev/sdb3 within gparted. I tried to increase the volume group using
$ sudo vgextend cl /dev/sdb3
Can't open /dev/sdb3 exclusively. Mounted filesystem?
I am not sure why it failed as I don't think /dev/sdb3 is mounted as the physical drive is attached to within another Linux CentOS 7 system which was used to image the hard drive.
How can I resize/extend /dev/sdb3
to use the reset of the unallocated space then increase /sdb3/cl-root to use all of the new space?
Some response I have seen show creating a new partition within the unallocated space and then adding it to the group/volume, but I was hoping to increase /dev/sdb3 to use the remaining unallocated space then increase the size of /sdb3/cl-root.