Operating System - HP-UX
1837527 Members
3753 Online
110117 Solutions
New Discussion

Re: lvextend -m 1 not working (not enougth PE)

 
SOLVED
Go to solution
Dirk Kilian
Advisor

lvextend -m 1 not working (not enougth PE)

Hi all,

I can't switch on the mirroring in an extend based striping configuration:

goliath:/etc (154) root% vgdisplay -v vgdb | more
--- Volume groups ---
VG Name /dev/vgdb
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 9
Act PV 8
Max PE per PV 25000
VGDA 16
PE Size (Mbytes) 4
Total PE 17352
Alloc PE 8438
Free PE 8914
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

goliath:/etc (155) root% lvdisplay -v /dev/vgdb/db | more
--- Logical volumes ---
LV Name /dev/vgdb/db
VG Name /dev/vgdb
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 32000
Current LE 8000
Allocated PE 8000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t1d0 2000 2000
/dev/dsk/c0t14d0 2000 2000
/dev/dsk/c0t15d0 2000 2000
/dev/dsk/c1t13d0 2000 2000

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c0t1d0 00063 current
00001 /dev/dsk/c0t15d0 00063 current
00002 /dev/dsk/c0t14d0 00062 current
00003 /dev/dsk/c1t13d0 00000 current
00004 /dev/dsk/c0t1d0 00064 current
00005 /dev/dsk/c0t15d0 00064 current
00006 /dev/dsk/c0t14d0 00063 current
00007 /dev/dsk/c1t13d0 00001 current

Error message:

goliath:/etc (156) root% lvextend -m 1 /dev/vgdb/db
lvextend: Not enough free physical extents available.
Logical volume "/dev/vgdb/db" could not be extended.

What can I do???
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor
Solution

Re: lvextend -m 1 not working (not enougth PE)

Hi Dirk,

You need to have lvmpvgs in order to enable mirroring on extent level striping.

Now edit /etc/lvmpvg and create a group with the disks that already have the logical volume create with extent level striping.

Create another group with free set of disks. Then you can extend the mirrors.

Your /etc/lvmpvg will look like this.

VG /dev/vgdb
PVG pri

/dev/dsk/c0t1d0
/dev/dsk/c0t15d0
/dev/dsk/c0t14d0
/dev/dsk/c1t13d0

PVG mir

/dev/dsk/c0t2d0
..
..
..


In the above, you need to have same number of free disks in the PVG mir.

Now you can do an lvextend -m 1 on lvdb and it should mirror it across the disks in the PVG mir.

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

Re: lvextend -m 1 not working (not enougth PE)

This problem can be caused because the

1) underlying physical volumes aren't the same size
2) something in the vg isn't mirrored

When you mirror, you need to have 2X the size your adding, with 1X available on each physical drive (or LUN).

I've fixed the problem by finding stuff that wasn't mirrored and putting on another vg.

I've also fixed this problem by adding more physical drives (LUNs) to the vg.

BTW, we have an operational rule that says if one thing in a given vg is mirrored, everything has to be mirrored.

Dirk Kilian
Advisor

Re: lvextend -m 1 not working (not enougth PE)

Hi all,
thank you for your answers. I'll try that tomorrow because I'm not in the office in the moment.
BR Dirk
Stefan Farrelly
Honored Contributor

Re: lvextend -m 1 not working (not enougth PE)

Theres not really enough information youve given us to see whats causing the problem.

You dont need PVG's - Physical volume groups in order to extend mirroring if you used extent-based striping manually, but in your case youve used the distributed option so you must have 4 different disks to mirror to.

Anyway, your lvol vgdb/db is 8000 extents over 4 disks;
c0t1d0
c0t14d0
c0t15d0
c1t13d0
(all in the same PVG)

In order to mirror the mirror must go onto a different disk from the 4 you have above. Ideally you would have 4 more disks in your volume group you could use. A vgdisplay -v vgdb would show how many disks you have in the vg and if any have free extents available. If you have 4 more disks in the vg unused you can vgreduce them, vgextend them back in under a new PVG, then you can mirror, or add 4 new disks into vgdb udner a new PVG name (different from the PVG your db lvol is in now) then you can mirror.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Dirk Kilian
Advisor

Re: lvextend -m 1 not working (not enougth PE)

Hi Stefan,

there are indeed 8 disks available for this volumegroup vgdb:

goliath:/etc (103) root% strings /etc/lvmtab
/dev/vgdb
/dev/dsk/c0t1d0
/dev/dsk/c0t13d0
/dev/dsk/c0t14d0
/dev/dsk/c0t15d0
/dev/dsk/c1t1d0
/dev/dsk/c1t13d0
/dev/dsk/c1t14d0
/dev/dsk/c1t15d0
/dev/vgdb01
/dev/dsk/c0t2d0
/dev/dsk/c1t2d0
/dev/vggprsbb
/dev/dsk/c0t3d0
/dev/dsk/c1t3d0
/dev/vgnms
/dev/dsk/c0t8d0
/dev/dsk/c1t8d0
/dev/vgbufcs
/dev/dsk/c0t11d0
/dev/dsk/c1t11d0
/dev/
/dev/dsk/c2t5d0
/dev/dsk/c3t5d0

goliath:/etc (105) root% strings /etc/lvmpvg
VG /dev/vg00
PVG scsi2_5
/dev/dsk/c2t5d0

The output of vgdisplay -v vgdb is a bit long, but all 8 disks are in there...

My problem is: In the original situation the 4 disks
/dev/dsk/c0t1d0
/dev/dsk/c0t13d0
/dev/dsk/c0t14d0
/dev/dsk/c0t15d0
where assigned to one pvg
and the other
/dev/dsk/c1t1d0
/dev/dsk/c1t13d0
/dev/dsk/c1t14d0
/dev/dsk/c1t15d0
where assigned to a mirrored pvg.

But unfortunately 3 disks were "broken" because of a SCSI bus failure and while taking out the stale disks (lvreduce -m 0 -k ...) the system switched to non-mirroring...

Now the disks are ok again, but not all disks belong to the sama pvg...

BR Dirk


BR Dirk
Dirk Kilian
Advisor

Re: lvextend -m 1 not working (not enougth PE)

Hi Shridar,

thanks a lot for your full hit!! I changed the /etc/lvmpvg in the way you were telling me and this is the result:

goliath:/etc (67) root% lvextend -m 1 /dev/vgdb/db
The newly allocated mirrors are now being synchronized.This operation will
take some time. Please wait ....

BR Dirk