1753454 Members
6507 Online
108794 Solutions
New Discussion юеВ

Re: Extending striped LV

 
SOLVED
Go to solution
Ralph Grothe
Honored Contributor

Extending striped LV

Hi forumers,

I have an SG cluster.
On one node there runs a package which has exclusively activated and mounted a VG which consists of 5 PVs from an EMC disk storage subsystem.
Because of performance when the LV was created it was decided to have the allocation as a stripe.
Now I tried to extend the VG and included two further PVs from the EMC.
PVs and LVs of this VG are now those:

# vgdisplay -v vgb13|awk '/LV Name/||/PV Name/{print $NF}'
/dev/vgb13/lvol1
/dev/dsk/c5t0d1
/dev/dsk/c5t0d2
/dev/dsk/c5t0d3
/dev/dsk/c5t0d4
/dev/dsk/c5t0d5
/dev/dsk/c5t0d6
/dev/dsk/c5t0d7


# vgdisplay vgb13
--- Volume groups ---
VG Name /dev/vgb13
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 7
Act PV 7
Max PE per PV 25000
VGDA 14
PE Size (Mbytes) 4
Total PE 12075
Alloc PE 8625
Free PE 3450
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


This theoretically gives me now 12075 PEs to allocate, but when I try to do so LVM responds with the following error:

# lvextend -l 12075 /dev/vgb13/lvol1
lvextend: Not enough free physical extents available.
Logical volume "/dev/vgb13/lvol1" could not be extended.
lvextend: Couldn't retrieve the list of the physical volumes
belonging to volume group "/dev/vgb13".
Failure possibly caused by strict allocation policy

Could it be it is because I attempt to extend a stripe which maybe isn't possible?
Does it mean I first will have to desolve the stripe altogether?
I'm afraid we don't have enough void disk space for the then required interim backup :-(

Thx
Ralph
Madness, thy name is system administration
5 REPLIES 5
Bill McNAMARA_1
Honored Contributor

Re: Extending striped LV

Are all your disks/PVs the same size
pvdisplay on all 7.

>This theoretically gives me now 12075 PEs to true

># lvextend -l 12075 /dev/vgb13/lvol1
syntax okay, just one lvol in the vg should be no problem.... try 12000?!

>lvextend: Couldn't retrieve the list of the >physical volumes
>belonging to volume group "/dev/vgb13".
This is strange..
strings /etc/lvmtab
and vgdisplay -v vgb13
just to make sure all pvs are good.

>Failure possibly caused by strict allocation >policy
Possibly some problem with disk size not all being the same and it not being able to evenly stripe.
Try lvchange -s n /dev/vgb13/lvol1

You're not mirroring too are you?
lvdisplay -v /dev/vgb13/lvol1

Later,
Bill

It works for me (tm)
Ravi_8
Honored Contributor

Re: Extending striped LV

Hi,
when you are using lvextend you have to mention the size in MB not in terms of PE. even though the 12900 MB is free(3450(free PE)x4)you are getting error. i think use L instead of l in lvextend command.
(lvextend -L size(in MB) /dev/xxx/xxx)
never give up
John Palmer
Honored Contributor
Solution

Re: Extending striped LV

Extract from 'man lvextend':-
LVM striped logical volumes are always allocated using a strict allocation policy. Consequently, striped logical volumes may only be extended by a number extents that is a multiple of disks the logical volume is striped across. For example, for a logical volume striped across 3 disks, the logical volume will be extended in increments of 3
extents, with each of the 3 extents allocated on a different disk in the volume group.
------- end of extract --------

Your problem is due to the stripe width of 5 because lvextend is trying to extend in increments of 5 extents, you are running out of space in the disks that are already allocated.

The solution (as you suspected) is to create a new volume striped across the seven disks but this requires the existing volume to be removed and recreated. HP-UX doesn't allow you to remove the 'strict' allocation for striped volumes.

Rather than extending the existing volume, you could create a new logical on the two new PV's and use that as a separate mountpoint.

Regards,
John
Manju Kampli
Trusted Contributor

Re: Extending striped LV

Ralph,

Since you create the LV with 5 PVs initially with stripping, you can not extend the LV beyond 5 PVs.. If you want to make use of 7 PVs, you will have to remove the current LV and recreate the LV for with stripping on 7 PVs.. This is one of the big disadvantage of stripping the LV

Hope this helps,
Manju
Never stop "LEARNING"
Krishnan Seshadri
Occasional Advisor

Re: Extending striped LV

Hi Ralph

Yeah, it is a pain when it comes to extending lvs that are originally striped across x number of disks. One quick workaround would be, to temporarily remove any unstriped lvs' that you may have as part of the VG, which may hopefully give you room to extend the striped lv and then reinstate the lv that was removed. The key is if you have striped and non-striped lvs' in the same VG.