I'm trying to move data off of a fdisk partition to a gdisk partition.
/dev/xvdf1 - is the fdisk partition
/dev/xvdg1 - is the gdisk partition
However when trying to move the free space from /dev/xvdf1 to /dev/xvdg1 using pvmove, the free space stays behind, thus I can't extend it out with lvextend command.
I'm not sure where I'm going wrong here:
Code:
[root@linuxacademy dev]# pvcreate /dev/xvdg1
Physical volume "/dev/xvdg1" successfully created.
[root@linuxacademy dev]# vgextend battlestar /dev/xvdg1
Volume group "battlestar" successfully extended
[root@linuxacademy dev]# vgdisplay
--- Volume group ---
VG Name battlestar
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 9.99 GiB
PE Size 4.00 MiB
Total PE 2558
Alloc PE / Size 1279 / 5.00 GiB
Free PE / Size 1279 / 5.00 GiB
VG UUID YzXp39-usMZ-rkeg-AMSM-KECs-upPo-quDY2W
[root@linuxacademy dev]# pvs
PV VG Fmt Attr PSize PFree
/dev/xvdf1 battlestar lvm2 a-- 5.00g 0
/dev/xvdg1 battlestar lvm2 a-- 5.00g 5.00g
[root@linuxacademy dev]# vgs
VG #PV #LV #SN Attr VSize VFree
battlestar 2 1 0 wz--n- 9.99g 5.00g
[root@linuxacademy dev]# pvmove /dev/xvdf1
/dev/xvdf1: Moved: 0.00%
/dev/xvdf1: Moved: 10.79%
/dev/xvdf1: Moved: 20.95%
/dev/xvdf1: Moved: 32.06%
/dev/xvdf1: Moved: 43.86%
/dev/xvdf1: Moved: 55.36%
/dev/xvdf1: Moved: 67.40%
/dev/xvdf1: Moved: 79.67%
/dev/xvdf1: Moved: 91.40%
/dev/xvdf1: Moved: 100.00%
[root@linuxacademy dev]# pvs
PV VG Fmt Attr PSize PFree
/dev/xvdf1 battlestar lvm2 a-- 5.00g 5.00g
/dev/xvdg1 battlestar lvm2 a-- 5.00g 0
[root@linuxacademy dev]# vgs
VG #PV #LV #SN Attr VSize VFree
battlestar 2 1 0 wz--n- 9.99g 5.00g
[root@linuxacademy dev]# vgreduce battlestar /dev/xvdf1
Removed "/dev/xvdf1" from volume group "battlestar"
[root@linuxacademy dev]# pvs
PV VG Fmt Attr PSize PFree
/dev/xvdf1 lvm2 --- 5.00g 5.00g
/dev/xvdg1 battlestar lvm2 a-- 5.00g 0
[root@linuxacademy dev]# vgs
VG #PV #LV #SN Attr VSize VFree
battlestar 1 1 0 wz--n- 5.00g 0
[root@linuxacademy dev]# lvextend -L 5G /dev/battlestar/galacctia
Logical volume galacctia not found in volume group battlestar.
I don't understand why the free space moves from /dev/xvdg1 to /dev/xvdf1.
I also run vgreduce on /dev/xvdf1 to and no errors.
However when running lvextend against on /dev/xvdg1 there is no free space to extend it out with...
Not sure where I'm going wrong with this.