Operating System - HP-UX
1833004 Members
3000 Online
110048 Solutions
New Discussion

lvextend: Not enough physical extents

 
Dennis Carrillo
Occasional Contributor

lvextend: Not enough physical extents

I have a volume group that resides on two external drives that are not SAN attached, and that are mirrored. I recently added a 27GB SAN disk to the volume group w/ alternate links...Now when I try and extend the logical volume, I get the error that I don't have enough free physical extents, and that the failure is probably caused by the strict allocation policy.

My problem is, if I remove the strict allocation policy, could my mirrored copy get reallocated on the SAN disk...I'm trying to figure out how I can extend the logical volume to the SAN space, w/o affecting the physical volume attributes associated with the currently configured JBOD disks that are mirrored...Also, can this be done with the logical volume staying online..


--- Physical volumes ---
PV Name /dev/dsk/c1t0d0
PV Status available
Total PE 8681
Free PE 13
Autoswitch On

PV Name /dev/dsk/c2t0d0
PV Status available
Total PE 8681
Free PE 13
Autoswitch On

PV Name /dev/dsk/c12t0d6
PV Name /dev/dsk/c14t0d6 Alternate Link
PV Status available
Total PE 6945
Free PE 6945
Autoswitch On
9 REPLIES 9
Jim Turner
HPE Pro

Re: lvextend: Not enough physical extents

With strict allocation (the norm), you will not be able to extend a mirrored LV if you do not have enough free PEs for both copies of the LV on separate disks.

If you turn off strict allocation, your mirrored PEs can indeed reside on one PV. Who would want that?

If you have more than one LV, you might be able to adjust the location of existing PEs via pvmove(1M) and get enough free PEs on two separage PVs to do what you want.

Good luck, sir.
Todd McDaniel_1
Honored Contributor

Re: lvextend: Not enough physical extents

You only have room for 13 extent filesystem as I see it.

The only way for you to make a new filesystem is to make a LVOL that is notn irrored, Unless the disk is H/w mirrored of course, OR remove the 27GB San disk from the VG then make a new VG with it, THEN if that disk is h/w mirrored you could make a LVOl with out strict allocation.



As I see it, You either need to add a second disk to the current VG or move the new 27GB disk to a NEW VG...
Unix, the other white meat.
Sundar_7
Honored Contributor

Re: lvextend: Not enough physical extents

Yes, it is likely that if your mirror the LV, its first 13 extends will be mirrored to /dev/dsk/c1t0d0, the next 13 to /dev/dsk/c2t0d0 and then rest of it to the newly added disk, if you dont have strict allocation policy.

But with the above output, I guess your LV is of size more than 6945 PEs ?

Now if you try to extend the LV with strict allocation policy set, then LVM will try to use the new disk and it is failing due to the lack of space in the new disk.

What is the size of the LV you are trying to mirror ?
Learn What to do ,How to do and more importantly When to do ?
Dennis Carrillo
Occasional Contributor

Re: lvextend: Not enough physical extents

I added the SAN metavolume from an XP1024, which is using alternate links, so mirroring isn't used for the SAN space...I do have enough free space, but I think the issue is more related to the mix of JBODs with mirroring and the SAN volumes that are mirrored at the XP level, and the strict policy that is in place for the two JBODs that are mirrored. It almost seems like I would need to bring another duplicate SAN volume and mirror them, which is overkill, in order to abide by the srict allocation policy..If so, what a waste that would be...

Looks like the best alternative would be to use pvmove for the large lvol I am trying to extend, and moving it to another volume group with the SAN space I currently assigned to vg01.
Sridhar Bhaskarla
Honored Contributor

Re: lvextend: Not enough physical extents

Dennis,

If I understand your message correctly, you would like to leave the logical volume left mirrored on the JBODs and then extend it onto SAN disk.

I do not believe you can have a partially mirrored logical volume. You will have to add another SAN disk in order to extend the logical volume. But if you are going to add another SAN disk, you could move the LV from JBOD to SAN as well and release the JBOD disks. That way all the LV will be on SAN and you don't need to worry about mirrors.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Tom Danzig
Honored Contributor

Re: lvextend: Not enough physical extents

As stated by the others above, you would need to add two LUNS to the vg to maintain the mirroring of the lv. As this is on an XP array, this is redundant.

I would personally un-mirror the lv and simply move it to the XP. You could the use the JBOD disks for some other purpose.
Sundar_7
Honored Contributor

Re: lvextend: Not enough physical extents

LVM doesnt really care (infact cannot differentiate) if the LUN is from JBOD or from XP.

I think I misunderstood your question for the first time :-)

If you have a LV that is on c1t0d0/c2t0d0 and if you are planning to extend it to c12t0d0, then you need to add one more LUN to the VG before you can extend the LV.
Learn What to do ,How to do and more importantly When to do ?
Todd McDaniel_1
Honored Contributor

Re: lvextend: Not enough physical extents

I think Dennis has it right on..

"Looks like the best alternative would be to use pvmove for the large lvol I am trying to extend, and moving it to another volume group with the SAN space I currently assigned to vg01. "



He should make this a new Lvol NOT in VG00... which will be the best solution. Since it is H/w mirrored you don't need any allocation defined. BUT it does need to be in its own VG, in my opinion.
Unix, the other white meat.
Dennis Carrillo
Occasional Contributor

Re: lvextend: Not enough physical extents

Looks like we are going to move the lvol to a separate volume group, along with the SAN metavolume we created.

Thanks for all your help!!!