I recently cloned my ubuntu from a 250GB SSD to my new 2TB SSD. It automatically created an LVM with 248GB with my root filesystem in it.
I would like to resize the LVM to full 2TB.
nvme0n1 259:1 0 1.8T 0 disk
├─nvme0n1p1 259:7 0 512M 0 part /boot/efi
└─nvme0n1p2 259:8 0 1.8T 0 part
├─vgubuntu-root 253:0 0 231.4G 0 lvm /
└─vgubuntu-swap_1 253:1 0 976M 0 lvm [SWAP]
However the PSize is only 250 GB, rather than 2TB fromsudo pvs
PV VG Fmt Attr PSize PFree /dev/nvme0n1p2 vgubuntu lvm2 a-- 232.38g 0
I see the following output from lvdisplay
:
--- Logical volume --- LV Path /dev/vgubuntu/root LV Name root VG Name vgubuntu LV UUID 0wM6pq-o26o-qVBf-1x61-vFbP-Poyf-fFW3f7 LV Write Access read/write LV Creation host, time ubuntu, 2021-04-24 06:13:08 +0800 LV Status available # open 1 LV Size <231.43 GiB Current LE 59246 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0
I tried the following lvextend
command but it does not extend beyond 248GB size:
lvextend -l +100%FREE /dev/vgubuntu/root/
with the output:
New size (59246 extents) matches existing size (59246 extents).
Can someone please advise?
lvdisplay
? A lot of the time the lvname is different than what you see when you run likelsblk
ordf
. What we are looking for is the name associated withLV Path
.vgdisplay vgubuntu
?pvs
states 0 free space. You need to extend outnvme0n1p2
partition size. See askubuntu.com/questions/877743/cannot-extend-lvm-partition?rq=1