Operating System - HP-UX
1752679 Members
5594 Online
108789 Solutions
New Discussion юеВ

Extend LVOL with "Allocation PVG-strict/distributed"

 
Pedro Izael
New Member

Extend LVOL with "Allocation PVG-strict/distributed"

Hi guys,
I need to extend a Volume, but when I try it I received the following error :

# lvextend -L 358400 /dev/vg_dsprod/lvol1
lvextend: Not enough free physical extents available.
Logical volume "/dev/vg_dsprod/lvol1" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.
#

I have doubts if in my case is necessary use this "allocation" configuration, because I dont have mirrors.

The VG/LVOL configuration are in the attachment.

Tks,

Pedro
6 REPLIES 6
TTr
Honored Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

The LVOL that you are trying to extend is distributed (LE based stripe) on the six PVs in the VG.

You can see it in your attachment how the LEs of the LVOL are spread on each of the six disks d0, d1, d2 ,d3 ,d4 ,d5 and are repeating.

> --- Logical extents ---
> LE PV1 PE1 Status 1
> 00000 /dev/dsk/c30t3d0 00000 current
> 00001 /dev/dsk/c30t3d1 00000 current
> 00002 /dev/dsk/c30t3d2 00000 current
> 00003 /dev/dsk/c30t3d3 00000 current
> 00004 /dev/dsk/c30t3d4 00000 current
> 00005 /dev/dsk/c30t3d5 00000 current
> 00006 /dev/dsk/c30t3d0 00001 current
> 00007 /dev/dsk/c30t3d1 00001 current
> 00008 /dev/dsk/c30t3d2 00001 current
> 00009 /dev/dsk/c30t3d3 00001 current
> 00010 /dev/dsk/c30t3d4 00001 current


You can not extend it based on the existing layout.

You can try and change the PVG-strict allocation and then try to extend it but I don't know it will be allowed in this case.
James R. Ferguson
Acclaimed Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

Hi:

If you want to break the distributed allocation policy, do so with:

# lvchange -D n ...

Otherwise, you will need free extents on an equal number of physical volumes to that which already comprise the geometry of the logical volume you are trying to extend.

Regards!

...JRF...
Jayakrishnan G Naik
Trusted Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

Hi

I find that there is a new PV added, may be for the purpose of extending the lvol. But the policy prevents you to add the free extends directly to the lvol as the lvols are created with Distributed & PVG strict allocation policies.The free extends also should be equally distributed to extend your lvol using - lvextend and fsadm.

I can see that the new PV added is not in the PVG (Even if it is in, it wont help your cause.

You need to think and search out of the box as the normal lvextend & fsadm wont help here.

Regards
Jayakrishnan G Naik
Jayakrishnan G Naik
Trusted Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

Hi James R Ferguson,

Can we use the lvchange -D n (breaking distribustion policy) in this scenario?

As per my understanding, the PV having the free extends is not a part of the PVG and in the normal scenario we cannot add this to the existing PVG with the PVG strict/Distributed allocation policy.

So if we proceed with breaking distribution policy of the lvol, can we use the extends from a PV which is outside the PVG for extention? The PV with free extends, "/dev/dsk/c30t3d7" is not a part of the PVG as well.


PV Name /dev/dsk/c30t3d5
PV Status available
Total PE 6399
Free PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c30t3d7
PV Status available
Total PE 6399
Free PE 6399
Autoswitch On
Proactive Polling On


--- Physical volume groups ---
PVG Name pvg_dsprod
PV Name /dev/dsk/c30t3d0
PV Name /dev/dsk/c30t3d1
PV Name /dev/dsk/c30t3d2
PV Name /dev/dsk/c30t3d3
PV Name /dev/dsk/c30t3d4
PV Name /dev/dsk/c30t3d5

Regards
Jayakrishnan G Naik
Patrick Wallek
Honored Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

You may have to do 2 things here:

1) Disable the distributed allocation policy, as JRF talked about.

2a) You may also need to disable the PVG-strict allocation policy. You can also use 'lvchange' to do this. You would need to do 'lvchange -s n' on the appropriate LV.

Once you do that, you should be able to use the additional disk with the LV even though it isn't in the PVG.

2b) You can easily add the disk to the PVG. Edit the /etc/lvmpvg file and add the disk that is currently NOT part of the PVG to the PVG. They syntax in the file is simple. Just copy the line for one of the other disks and change the /dev/dsk/c?t?d? appropriately.

Once you do that, you should be able to extend the LV if you have disabled the 'distributed' option in 1 above.
Shibin_2
Honored Contributor

Re: Extend LVOL with "Allocation PVG-strict/distributed"

Hi Pedro,

As others said, the data is spanned over 5 disks. You can't simply add a single disk and can expand it as you wish.

If you need to keep the PVG Strict/distributed policy, you need to add 6 disks to PVG first.

Let's say, if you need to add 50GB to the file system, you need to add 6x9GB disks to this PVG, then proceed with extend.

Before you add 6x9GB, you need to consider one more thing. i.e MaxPV. Your Max PV is 17 and current is 6. If you add another 6 of 9G, then in future, you won't be able to expand it. So, please consider it before adding the new size.
Regards
Shibin