LVM drive stretch
by flamery from LinuxQuestions.org on (#54QK5)
Hi friends,
made a bit of a stupid mistake when stretching a disk, I added 550Gb to the existing disk in vmware, created a partition in fdisk, created a pv, stretched the group onto that pv, then stretched the lv to 100%.
after doing all this I realised the partition I had created was only 15Gb (I used fdisk default values I didn't check thoroughly!!). I went back into fdisk, deleted the partition, created a new partition with the same starting point and full size this time and rebooted.
Now the problem is, it seems like the change I make in fdisk is not actually taking effect, for example, after reboot fdisk sees the correct partition size, but parted does not (still shows the partition as 15gb and 500gb of free space. This has prevented me from doing a pvresize, it still thinks the disk is only 15g. Any ideas what else I could do to try and claim this space? I wanted to just delete the pv and start over but I cant do a pvmove because there is no free space to move the new pv off to and because the disk is so full its starting consuming space on this pv aswell.
some outputs:
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_one lvm2 a-- 15.42g 0
/dev/sda3 vg_one lvm2 a-- 1.00t 0
fdisk -l
Disk /dev/sda: 1664.3 GB
Device Boot Start End Blocks Id System
/dev/sda1 1 2202009599 1101004769+ ee GPT
/dev/sda2 2202009600 3040870389 419430300 ee GPT
pvmove /dev/sda2
No extents available for allocation
pvdisplay /dev/sda2
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_one
PV Size 15.65 GiB / not usable 24.78 MiB
Allocatable yes (but full)
PE Size 32.00 MiB
Total PE 500
Free PE 0
Allocated PE 500
pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
vgs
VG #PV #LV #SN Attr VSize VFree
vg_one 2 2 0 wz--n- 1.00t 0


made a bit of a stupid mistake when stretching a disk, I added 550Gb to the existing disk in vmware, created a partition in fdisk, created a pv, stretched the group onto that pv, then stretched the lv to 100%.
after doing all this I realised the partition I had created was only 15Gb (I used fdisk default values I didn't check thoroughly!!). I went back into fdisk, deleted the partition, created a new partition with the same starting point and full size this time and rebooted.
Now the problem is, it seems like the change I make in fdisk is not actually taking effect, for example, after reboot fdisk sees the correct partition size, but parted does not (still shows the partition as 15gb and 500gb of free space. This has prevented me from doing a pvresize, it still thinks the disk is only 15g. Any ideas what else I could do to try and claim this space? I wanted to just delete the pv and start over but I cant do a pvmove because there is no free space to move the new pv off to and because the disk is so full its starting consuming space on this pv aswell.
some outputs:
pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_one lvm2 a-- 15.42g 0
/dev/sda3 vg_one lvm2 a-- 1.00t 0
fdisk -l
Disk /dev/sda: 1664.3 GB
Device Boot Start End Blocks Id System
/dev/sda1 1 2202009599 1101004769+ ee GPT
/dev/sda2 2202009600 3040870389 419430300 ee GPT
pvmove /dev/sda2
No extents available for allocation
pvdisplay /dev/sda2
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_one
PV Size 15.65 GiB / not usable 24.78 MiB
Allocatable yes (but full)
PE Size 32.00 MiB
Total PE 500
Free PE 0
Allocated PE 500
pvresize /dev/sda2
Physical volume "/dev/sda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
vgs
VG #PV #LV #SN Attr VSize VFree
vg_one 2 2 0 wz--n- 1.00t 0