can't reduce my lvm
Hello,
I've just created a VG called LVM, the PV /dev/hdc1..3 and a LV (called Media) containing all three PVs. It have 233 GB free space. Than I copy 198 GB of data from another device to it.
After this I want to extend my LV. Therefore I add the PVs /dev/hdd1 and /dev/hdd2 to the VG.
All this will be done with webmin.
vdr:~# vgdisplay LVM --- Volume group --- VG Name LVM VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 1 Open LV 0 MAX LV Size 2 TB Max PV 256 Cur PV 5 Act PV 5 VG Size 418.97 GB PE Size 32 MB Total PE 13407 Alloc PE / Size 13407 / 418.97 GB Free PE / Size 0 / 0 VG UUID 4lE9xF-g9JE-o98E-y3H6-IqsS-0fbT-SDhR1x
Than I try to resize my LV.
lvextend -L+5959 /dev/LVM/Media /dev/hdd1 /dev/hdd2 e2fsadm -l 13407 /dev/LVM/Media
e2fsadm -- size of "/dev/LVM/Media" would not change
The reason is that my LV can't grow about 256 GB because my physical extend is 32MB ?
Ok. I like to remove the two PV /dev/hdd1 and /dev/hdd2 from the VG.
vdr:~# pvmove /dev/hdd2
pvmove -- moving physical extents in active volume group "LVM"
pvmove -- WARNING: if you lose power during the move you may need
to restore your LVM metadata from backup!
pvmove -- do you want to continue? [y/n] y
pvmove -- not enough free/allocatable physical extentsWhats That !?
I can't use /dev/hdd in the LV and I can't remove it from it?
Please help me!
Matthias
Signature · 1 line
Don't Panic
Re: [linux-lvm] can t reduce my lvm
And afer I try
lvreduce -l-5959 /dev/LVM/Media
all work well:
vdr:~# pvmove /dev/hdd2 pvmove -- no logical volumes on empty source physical volume "/dev/hdd2"
vdr:~# pvmove /dev/hdd1 pvmove -- no logical volumes on empty source physical volume "/dev/hdd1"
vdr:~# vgreduce LVM /dev/hdd1 /dev/hdd2 vgreduce -- doing automatic backup of volume group "LVM" vgreduce -- volume group "LVM" successfully reduced by physical volumes: vgreduce -- /dev/hdd1 vgreduce -- /dev/hdd2
Signature · 1 line
Don't Panic