Operating System - HP-UX
1833569 Members
3681 Online
110061 Solutions
New Discussion

Re: Logical volume mirrir and strip

 
tots
New Member

Logical volume mirrir and strip

Hi Gurus,

i have 4 disks in a vol grp of equal sizes 2mb each, with one logical volume of 3mb size which is stiped across first two disks. I want to mirror(along with strip) the above logical volume on to two other two disks. Can someone sugget me how to go about.

tots
11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: Logical volume mirrir and strip

Hi:

You can mirror and strip with "extent-based mirrored strips". A good discussion is actually in the man pages for 'lvcreate'. There is a detailed example at the end.

...JRF...
Patrick Wallek
Honored Contributor

Re: Logical volume mirrir and strip

You cannot use striping and mirroring together. HP does NOT support this.

What you can use is the '-D' option to lvcreate which creates the lv as a distributed lv. A distributed lv basically does striping, but it is extent based striping. This means that when the lv is created the first extent is put on disk1, the second extent on disk2, the third on disk1, etc until your lv is created.

To create a distributed lv, your disks MUST be in a PVG (physical volume group). This can be done when the VG is created, or can be done later by editing the /etc/lvmpvg file (do a 'man lvmpvg' for more info.).

When using the -D to create a distributed LV, you CAN then use -m to create a mirror. I think you also have to use the '-s g' option so that your mirror will be PVG-strict.

Here is the full command you can use to create a distributed, mirrored LV:

lvcreate -L20 -D y -s g -m 1 -n name /dev/vg02
Rajeev Tyagi
Valued Contributor

Re: Logical volume mirrir and strip

tot,

You can use following command.

#lvextend -m

here physical device is optional. But be sure about your physical volume sizes it can not be in Mbs.
Rajeev Tyagi
Valued Contributor

Re: Logical volume mirrir and strip

Tots,

I am sorry. I could get it now you r looking for RAID 1 + 0 setup .I agree with patrick.
tots
New Member

Re: Logical volume mirrir and strip

Hi,

JRF, Patrick and Rajeev you all gave food for my thought. I was thinking about using -i & -I option with lvcreate for contolling striping. Any suggestion for this.

tots
Patrick Wallek
Honored Contributor

Re: Logical volume mirrir and strip

If you use -i and -I you will NOT be able to use -m to set up mirroring.

tots
New Member

Re: Logical volume mirrir and strip

Hi Patrick,

Then how am i going to control the size of the strip. Oops.
I would have tried it but short of system to check on.

tots
Patrick Wallek
Honored Contributor

Re: Logical volume mirrir and strip

If you want to stripe and mirror you must use -D for distributed (extent-based striping). You can NOT control the stripe size with this option. It uses the PE-Size that is configured when you create the Volume Group.

Have a look at the man page for lvcreate and read the section that talks about the '-D' option. There is lots of good information there.
Jeen Oppedijk
Advisor

Re: Logical volume mirrir and strip

Gents,
Striping with 1MB (minimal extend size or worse the default 4MB size) is not recommended by storage experts. Striping should be done with pieces of 2-64KB blocks, anything bigger is a waste of resources. Therefore, even using the -I option to 1MB and than (manually!) assigning the extends to the disks will not help.
If you want to be save, just mirror the disks.
Manju Kampli
Trusted Contributor

Re: Logical volume mirrir and strip

tots,

If you haven't got the answer you are looking then here it is:

-> You need to recreate your VG,LVs for doing this.
Add /etc/lvmpvg file with the disk names. See man pages of lvmpvg for the syntax. Create two PVG with teo disks each ( say PVG1, PVG2)
Create the VG using the PVG Name (PVG1, PVG2) instead of Disk name
Create the LV using PVG1
extend LV on to PVG1 with mirror option
ex: lvextend -m 1 /dev/vgx/lvolx PVG1 ( see lvextend for more option)

hope this helps
Manju
Never stop "LEARNING"
Tim D Fulford
Honored Contributor

Re: Logical volume mirrir and strip

This is not answering the question, but It is possible to use a kilobyte stripe and have it mirrored if you use hardware mirroring, say on an auto raid or fc60.

Tot, does you system support HW mirroring? if so then you can use thin stripes. If not, then you are stuck with mirror no stripes(RAID1) or extent based [wide] stripes with mirroring (RAID1+0).

Tim
-