cannot extend lv
I have a vg (data) with four drives /dev/sd[b-e]1
I created a 2 stripes lv (data1) with sd[bc]1
Now I want to add the remaining two drives to the lv, but lvextend complains about missing pes! I tried also with a very small number of pes - without success:
lvextend -l +400 /dev/data/data1 /dev/sde1 /dev/sdd1
lvextend -- extending logical volume "/dev/data/data1" to 35.45 GB
lvextend -- not enough free/allocatable physical extents to extend logical volume "/dev/data/data1"
It returns error code 12:
12 error setting up VGDA for logical volume extension which is not very useful in this case.
Any idea?
kind regards,
Rainer
here comes a vgdisplay:
vgdisplay -v
--- Volume group ---
VG Name data VG Access read/write VG Status available/resizable VG # 0 MAX LV 256 Cur LV 1 Open LV 1 MAX LV Size 255.99 GB Max PV 256 Cur PV 4 Act PV 4 VG Size 50.83 GB PE Size 4 MB Total PE 13012 Alloc PE / Size 8676 / 33.89 GB Free PE / Size 4336 / 16.94 GB VG UUID sIKhBA-LMrL-e0h0-5NEt-mVSZ-3SrM-2KB7XS
--- Logical volume ---
LV Name /dev/data/data1 VG Name data LV Write Access read/write LV Status available LV # 1 # open 2 LV Size 33.89 GB Current LE 8676 Allocated LE 8676 Stripes 2 Stripe size (KByte) 16 Allocation next free Read ahead sectors 1024 Block device 58:0
--- Physical volumes ---
PV Name (#) /dev/sdb1 (3) PV Status available / allocatable Total PE / Free PE 4338 / 0
PV Name (#) /dev/sdc1 (2) PV Status available / allocatable Total PE / Free PE 4338 / 0
PV Name (#) /dev/sdd1 (1) PV Status available / allocatable Total PE / Free PE 2167 / 2167
PV Name (#) /dev/sde1 (4) PV Status available / allocatable Total PE / Free PE 2169 / 2169
Quoted 2 lines · On Sat, Jan 18, 2003 at 11:35:28AM +0000…
I have a vg (data) with four drives /dev/sd[b-e]1
I created a 2 stripes lv (data1) with sd[bc]1
^^^^^^^
You cannot extend striped lvs onto new pvs. Even on the same physical hardware. Once you have striped it, you are tied to the pvs used.
If you think about it, this makes sense, as otherwise you have some stripes containing more data than others. In fact, as soon as the smallest pv is full, you will not be able to extend the lv, even if there is room in the other pvs.
If you want to have the filesystem striped over all the disks, you will need to create a new lv which is striped across them all, transfer the data to it, delete the old lv and then extend the new one.
Backups highly recommended.
Michael
Signature · 2 lines
Think Locally, Act Globally: "It's cold in here ... I'd better release a few million tons of CFCs!"