Operating System - HP-UX
1833707 Members
2045 Online
110063 Solutions
New Discussion

How to create a Striped Mirror logical volume

 
RSA
Advisor

How to create a Striped Mirror logical volume

Hello.
I'm trying to create a striped and mirrored logical volume. I already installed PHCO_36746 with dependencies, this patch should enable HP-UX 11.23 for doing this.

http://www12.itrc.hp.com/service/cki/patchDocDisplay.do?patchId=pdb_na-PHCO_36746-1

But I'm still getting this error:

lvcreate -l 2 -i 2 -I 64 -m 1 /dev/vg02

Not allowed to create a striped and mirrored logical volume.
Install the "16TB LV and Striped Mirror feature enabling patch", to enable this feature.

It would be very nice if someone can help on this.

Thanks
Ralph
25 REPLIES 25
Steven E. Protter
Exalted Contributor

Re: How to create a Striped Mirror logical volume

Shalom Ralph,

LVM doesn't really do what you want it to do.

You can fake it out and achieve the same effect by doing the following:
1) lvcreate
2) Writing a script to do a rotating lvextend among the various disks. Charles Keenan has a good example in his book HP-UX CSE.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: How to create a Striped Mirror logical volume

Hi Ralph:

Did you install both PHCO_36744 and PHKL_36745 too?

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: How to create a Striped Mirror logical volume

Shalom Ralph,

LVM doesn't really do what you want it to do.

You can fake it out and achieve the same effect by doing the following:
1) lvcreate
2) Writing a script to do a rotating lvextend among the various disks. Charles Keenan has a good example in his book HP-UX CSE.

You may also be missing mirror/ux which is probably required to pull this off. mirror-ux is a pay for add in product.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi James,

yes, I already double checked. I have installed these two also.

Thanks
Ralph
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi Steven,

MirrorUx is also installed on this system. I will have a look into the CSE book on Monday.
But I think or hope it's possible to get a striped/mirrored lvol with the specific patch.

Thanks
Ralph
Sandman!
Honored Contributor

Re: How to create a Striped Mirror logical volume

Make sure that the patch installed correctly. Look in /var/adm/sw/swagent.log file for any errors related to that patch installation. How many PVs are part of vg02? It might be failing because you have only one PV as part of that VG.

~hope it helps
Geoff Wild
Honored Contributor

Re: How to create a Striped Mirror logical volume

I didn't think you can do this - I thought all you can do is create "EXTENT-BASED MIRRORED STRIPES"

The other question is - if you have the need for both mirroing and striping - then why do both logically?

IE - why not do hardware mirroing instead?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sandman!
Honored Contributor

Re: How to create a Striped Mirror logical volume

>I didn't think you can do this - I thought all you can do is create "EXTENT-BASED MIRRORED STRIPES"

I concur with Geoff but apparently PHCO_36746 makes it happen. The patch database does not have enough information on how it is done. At the very least it should take a minimum of 4 PVs to create a striped and mirrored lvol. But that's just my 2 cents.

I am very interested in how that patch enables that functionality. Moreover it is better to have hardware based striping and mirroring (which is provided by most of the high end arrays like the XP storage line).
Bernhard Mueller
Honored Contributor

Re: How to create a Striped Mirror logical volume

Ralph

Sandman said you would need at least 4 PVs for your command to work. However, reading the lvcreate manpage after installing the patches reveals that your vg would need at least 5 (!) PVs to to that.

I am currently looking for 5 disks, will let you know....

Regards,
Bernhard
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi all.
The system (Integrity RX6600) contains 16 harddisk. The SAS controllers are able to create a HW Raid, but I would really like to use Software Raid 10 with LVM.

The volumegroup vg02 contains six PVs.
I tried this command to have more then 4 PVs in the lvol:

Stripes 3
Mirror 1

lvcreate -l 2 -i 3 -I 64 -m 1 /dev/vg02
Not allowed to create a striped and mirrored logical volume.
Install the "16TB LV and Striped Mirror feature enabling patch",
to enable this feature.

But I recivied the same error..., swlist says I have installed the required patch.

swlist -l patch PHCO_36746
# Initializing...
# Contacting target "xxxxxx"...
#
# Target: xxxxxx:/
#

# PHCO_36746 1.0 LVM Striped/Mirror + 16TB LV Enablement
# PHCO_36746.LVM-RUN 1.0 LVM.LVM-RUN applied


Thanks
Ralph





Bernhard Mueller
Honored Contributor

Re: How to create a Striped Mirror logical volume

Ralph,

I do have 5 disks now i my dummy_vg but I still get the same error as you do....

also when doing this in two steps and with or without PVGs...

Bad luck, there must be some switch to flick...

Regards,
Bernhard
James R. Ferguson
Acclaimed Contributor

Re: How to create a Striped Mirror logical volume

Hi (again) Ralph:

One question and one request for confirmation:

Have you tried creating the configuration using '-L ' rather than with '-l ?

Everythihg would seem to be otherwise correct (all patches applied, etc.). It would also be "nice" to confirm that all three patches are configured:

# swlist -a state PHCO_36744 PHKL_36745 PHCO_36746

Regards!

...JRF...
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi James.

Everything looks good:

swlist -a state PHCO_36744 PHKL_36745 PHCO_36746
# Initializing...
# Contacting target "xxxxx"...
#
# Target: xxxxx:/
#

# PHCO_36744
PHCO_36744.LVM-ENG-A-MAN configured
PHCO_36744.LVM-MIRROR-RUN configured
PHCO_36744.LVM-RUN configured
PHCO_36744.UX-FRE-I-MSG configured
PHCO_36744.UX-FRE-U-MSG configured
PHCO_36744.UX-GER-I-MSG configured
PHCO_36744.UX-GER-U-MSG configured
PHCO_36744.UX-ITA-I-MSG configured
PHCO_36744.UX-ITA-U-MSG configured
PHCO_36744.UX-JPN-E-MSG configured
PHCO_36744.UX-JPN-S-MSG configured
PHCO_36744.UX-JPN-U-MSG configured
PHCO_36744.UX-KOR-E-MSG configured
PHCO_36744.UX-KOR-U-MSG configured
PHCO_36744.UX-SCH-H-MSG configured
PHCO_36744.UX-SCH-U-MSG configured
PHCO_36744.UX-SPA-I-MSG configured
PHCO_36744.UX-SPA-U-MSG configured
PHCO_36744.UX-TCH-B-MSG configured
PHCO_36744.UX-TCH-E-MSG configured
PHCO_36744.UX-TCH-U-MSG configured
# PHCO_36746
PHCO_36746.LVM-RUN configured
# PHKL_36745
PHKL_36745.CORE2-KRN configured
PHKL_36745.LVM-KRN configured

Also the size option does'nt work:

lvcreate -L 2048 -i 3 -I 64 -m 1 /dev/vg02
Not allowed to create a striped and mirrored logical volume.
Install the "16TB LV and Striped Mirror feature enabling patch",
to enable this feature.


Thanks a lot.
Ralph
Patrick Wallek
Honored Contributor

Re: How to create a Striped Mirror logical volume

At this point, if you have a support contract, you should open a support call with HP. Everything sounds like it has been installed correctly.

The only other thing I could see would be to create 2 physical volume groups and then set the PVG-strict option for mirroring.
Sandman!
Honored Contributor

Re: How to create a Striped Mirror logical volume

Make sure you have the IA version of the patch as the patch database mentions two filesets one for PA and one for IA. Please post the output of the commands below:

# swlist -a software_spec -l fileset PHCO_36746
# ll /opt/lvm/.LargeLVStripeMirror

as ".LargeLVStripeMirror" is the file supposedly installed by the patch.

~cheers
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi. Here is the output:

swlist -a software_spec -l fileset PHCO_36746

# Initializing...

# Contacting target "xxxxx"...

#

# Target: xxxxx:/

#



# PHCO_36746 PHCO_36746,l=/,r=1.0,a=HP-UX_B.11.23_IA/PA,v=HP

PHCO_36746.LVM-RUN PHCO_36746.LVM-RUN,l=/,r=1.0,a=HP-UX_B.11.23_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.23_IA


ll /opt/lvm/.LargeLVStripeMirror

-r--r--r-- 1 bin bin 128 Dec 17 21:35 /opt/lvm/.LargeLVStripeMirror


I have opened a support case, I will keep you posted.

Thanks
Ralph

Sandman!
Honored Contributor

Re: How to create a Striped Mirror logical volume

>The volumegroup vg02 contains six PVs.

Are all the 6 PVs that make up /dev/vg02 volume group empty? And have you tried creating an lvol with 2 stripes instead of 3 stripes i.e.

# lvcreate -I 64 -m 1 -i 2 vg02

...and as suggested see if you can do extend-based mirrored stripes by using PVGs. Do a man on lvmpvg(4) for details.
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi Sandman.

The volume group vg02 is totally empty:

vgdisplay -v vg02

--- Volume groups ---

VG Name /dev/vg02

VG Write Access read/write

VG Status available

Max LV 255

Cur LV 0

Open LV 0

Max PV 16

Cur PV 6

Act PV 6

Max PE per PV 4375

VGDA 12

PE Size (Mbytes) 32

Total PE 26244

Alloc PE 0

Free PE 26244

Total PVG 0

Total Spare PVs 0

Total Spare PVs in use 0



Also two stripes are not working:

lvcreate -I 64 -m 1 -i 2 -L 2048 vg02

Not allowed to create a striped and mirrored logical volume.

Install the "16TB LV and Striped Mirror feature enabling patch",

to enable this feature.

I will have a look on PVGs, maybe this is also a solution for me.

Thanks
Ralph
RSA
Advisor

Re: How to create a Striped Mirror logical volume

I read a bit about PVGs. For my understanding thats not what I want.

Lets say I create this configuration:

VG /dev/vg02
PVG pvg0
/dev/dsk/c0t1d0
/dev/dsk/c0t2d0
/dev/dsk/c0t3d0
PVG pvg1
/dev/dsk/c1t1d0
/dev/dsk/c1t2d0
/dev/dsk/c1t3d0


If I create an lvol then the extends will be distributed over the pvols. That looks for me as a "normal" mirror Raid 1. But I want to create Raid01 or Raid10 lvols.

Ralph
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Wow!!! It's working.

The option must be activated:

export LVM_CONFIGURE=1; lvmadm -i LargeLVStripeMirror; krs_flush

Now everything is working:

lvcreate -L 90 -i 3 -I 64 -m 1 /dev/vg02

Warning: rounding up logical volume size to extent boundary at size "96" MB.

Logical volume "/dev/vg02/lvol1" has been successfully created with

character device "/dev/vg02/rlvol1".

Logical volume "/dev/vg02/lvol1" has been successfully extended.

Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf



lvdisplay -v /dev/vg02/lvol1

--- Logical volumes ---

LV Name /dev/vg02/lvol1

VG Name /dev/vg02

LV Permission read/write

LV Status available/syncd

Mirror copies 1

Consistency Recovery MWC

Schedule striped

LV Size (Mbytes) 96

Current LE 3

Allocated PE 6

Stripes 3

Stripe Size (Kbytes) 64

Bad block on

Allocation strict

IO Timeout (Seconds) default



--- Distribution of logical volume ---

PV Name LE on PV PE on PV

/dev/dsk/c1t6d0 1 1

/dev/dsk/c1t5d0 1 1

/dev/dsk/c1t4d0 1 1

/dev/dsk/c2t6d0 1 1

/dev/dsk/c2t5d0 1 1

/dev/dsk/c2t4d0 1 1



--- Logical extents ---

LE PV1 PE1 Status 1 PV2 PE2 Status 2

00000 /dev/dsk/c1t6d0 00000 current /dev/dsk/c2t6d0 00000 current

00001 /dev/dsk/c1t5d0 00000 current /dev/dsk/c2t5d0 00000 current

00002 /dev/dsk/c1t4d0 00000 current /dev/dsk/c2t4d0 00000 current


Thanks to all
Ralph
Patrick Wallek
Honored Contributor

Re: How to create a Striped Mirror logical volume

What I was thinking was something like this:

lvcreate -L 100 -i 2 -I 64 -m 1 -s g /dev/vg02

Your LV would hopefully be created as a stripe across 2 disks, hopefully in one PVG and then mirrored to the other PVG.
James R. Ferguson
Acclaimed Contributor

Re: How to create a Striped Mirror logical volume

Hi (again) Ralph:

Very good! Where is the 'lvmadm' that you posted, documented? Did the response center offer this?

Regards!

...JRF...
RSA
Advisor

Re: How to create a Striped Mirror logical volume

Hi James.
Yes, the HP Support Center offered this additional information. It's not documented in the Patch description.

Ralph

Patrick Wallek
Honored Contributor

Re: How to create a Striped Mirror logical volume

Hopefully HP will update the patch documentation and list that in the "Special Installation Instructions" (or whatever that section is) so it is known.

That is a major oversight on HP's part.