Operating System - HP-UX
1833753 Members
2779 Online
110063 Solutions
New Discussion

Re: strict allocation policy problem in logical volume

 
CSP_ALGERIA
Frequent Advisor

strict allocation policy problem in logical volume

Hello

In first time we have a volume group crated on 05 disk 36GB with in 02 logical volume 20GB each one, stripped on 05 disks.

After lot off errors on those disks we want to restore lvm structure on 02 disks 73Gb with other device files

We have done the following:

Vgexport –v –m /tmp/vg02.map /dev/vg02 OK
Mkdir /dev/vg02, mknod /dev/vg02/group c 64 0x020000 OK
Use vgcfgrestore with option –o old_path
Vgcgrestore –n vg02-o /dev/rdsk/c3t0d0 /dev/rdsk/c2t1d0 OK
Vgcgrestore –n vg02 –o /dev/rdsk/c3t1d0 /dev/rdsk/c2t2d0 OK
Vgimport –v –m /tmp/vgO2.map /dev/vgO2 /dev/rdsk/c2t1d0 /dev/rdsk/c2t2d0 OK
Vgchange –a y –q n /dev/vg02 OK (quorum because vg02 was with 5 disk and now with 2)
Vgreduce –f /dev/vg02 OK (with vgdisplay we can see only 02 disks and vgchange –a y vg02 work now.
Lvreduce –L 0 /dev/vg02/lvol1 OK


All off those commands succeed but when trying to extend lvol1 we have the fowling message

# lvextend -L 10000 /dev/vg02/lvol1 /dev/dsk/c3t9d0
Need more PVs for "5" Stripes. Only have "1" PVs.
Failure possibly caused by strict allocation policy

The question is, how to disable the strict allocation policy? And to have the lvol1 on 02 disks

Best regards

Omar

Nothing in the world can take the place of persistence.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: strict allocation policy problem in logical volume

Hi Omar:

You can use 'lvchange -s n lv_path' to change from strict to non-strict allocation.

Regards!

...JRF...
CSP_ALGERIA
Frequent Advisor

Re: strict allocation policy problem in logical volume

hello James,

First many thanks for your feedback.

When I run the command, I have the following:

# lvchange -s n /dev/vg02/lvol2
lvchange: Only strict allocation is allowed for striped logical volumes.

# lvdisplay /dev/vg02/lvol2
--- Logical volumes ---
LV Name /dev/vg02/lvol2
VG Name /dev/vg02
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule striped
LV Size (Mbytes) 20000
Current LE 2500
Allocated PE 2500
Stripes 5
Stripe Size (Kbytes) 8
Bad block on
Allocation strict
IO Timeout (Seconds) default


attached file contains lvdisplay -v


Best regards

Omar
Nothing in the world can take the place of persistence.
Pedro Cirne
Esteemed Contributor

Re: strict allocation policy problem in logical volume

Hi Omar,

I think your problem is that when the lvol was created, it was defined with 5 stripes, this means the allocation is made across 5 diferent disks in a round-robin way.

Now, when you try to lvextend, it gives you an error because you just have 2 PV to stripe across.

Unfortunately you can't change the stripe policy, I think that the only option is to recreate lvol or have at least 5 PV with PE available for alocation on the VG.

Enjoy :)

Pedro
James R. Ferguson
Acclaimed Contributor

Re: strict allocation policy problem in logical volume

HI (again) Omar:

Yes, my apologies, I read too quickly. Striping infers "strict". Having created the logical volume with stipes across five physical disk, you will need five (5) physical volumes at a minimum to extend it.

Your recourse is to 'lvremove' it and recreate it again.

Regards!

...JRF...
CSP_ALGERIA
Frequent Advisor

Re: strict allocation policy problem in logical volume

hello

many thanks

best regards
Nothing in the world can take the place of persistence.