--- Volume group ---
VG Name BKMASTWS01-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 24.52 GiB
PE Size 4.00 MiB
Total PE 6277
Alloc PE / Size 6269 / 24.49 GiB
Free PE / Size 8 / 32.00 MiB
VG UUID vyqubz-yMyj-pNO0-4xqX-1taG-wRMI-rntXZQ
--- Logical volume ---
LV Path /dev/BKMASTWS01-vg/root
LV Name root
VG Name BKMASTWS01-vg
LV UUID odl7T5-LMR6-UA8K-vHyY-na5K-qQhX-MzW7sQ
LV Write Access read/write
LV Creation host, time BKMASTWS01, 2018-02-20 18:12:47 +0530
LV Status available
# open 1
LV Size 16.49 GiB
Current LE 4222
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Path /dev/BKMASTWS01-vg/swap_1
LV Name swap_1
VG Name BKMASTWS01-vg
LV UUID bX7HIJ-5dWd-S8UT-3NCA-Hcr7-HLuW-5Utg4B
LV Write Access read/write
LV Creation host, time BKMASTWS01, 2018-02-20 18:12:47 +0530
LV Status available
# open 0
LV Size 8.00 GiB
Current LE 2047
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
--- Physical volumes ---
PV Name /dev/sda5
PV UUID vGnKwB-Xlox-gM7n-QfuW-EWkD-1hre-iSOviD
PV Status allocatable
Total PE / Free PE 6277 / 8
I have this Ubuntu server running on VMWare ESXi. I increased its 25GB HDD to 50GB. This resulted in the new partition (/dev/sda5)
appearing on the system as expected. This PV was already considered part of the VG BKMASTWS01-vg as it was on the same HDD.
fdisk -l shows
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 52426751 51425282 24.5G 5 Extended
/dev/sda5 1001472 52426751 51425280 24.5G 8e Linux LVM
So in theory all I was to do to add it to the Logical Volume and resize the file system to increase the available space from 16 GB to 41 GB (8GB swap) approximately. This is however just not happening.
root@BKMASTWS01:~# lvextend -t /dev/BKMASTWS01-vg/root /dev/sda5
TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
Size of logical volume BKMASTWS01-vg/root changed from 16.49 GiB (4222 extents) to 16.52 GiB (4230 extents).
Logical volume root successfully resized.
Instead of adding 25GB, it only adds the 'free extents'. This PV is brand new and I cant understand how to 'free up the used extents' in the PV.
Can anyone figure out how this problem can be solved? The whole of the 25GB of the /dev/sda5 needs to get added to /dev/BKMASTWS01-vg/root LV and the file system needs to be resized.