Operating System - HP-UX
1752374 Members
6311 Online
108787 Solutions
New Discussion юеВ

Mirroring a striped volume (again)

 
SOLVED
Go to solution
Massimo Bianchi
Honored Contributor

Mirroring a striped volume (again)

Hi there. I've tryied to search the forum but was unable to find the correct answer to my question .. Maybe I didn't search with the right query .. But here is my question:

Is it possible to mirror an existing striped lvol ?? I've been told that somehow, somewhere in the deep space it's possible .. But nobody told me WHEN it is possible.

Any help will be apreciated :-)

7 REPLIES 7
Patrick Wallek
Honored Contributor
Solution

Re: Mirroring a striped volume (again)

If the volume was striped normally, meaning with the '-i' and '-I' options to lvcreate, then NO you CAN NOT mirror it with LVM.

However, if you create an LV and use the "Distributed" option, '-D y' option to lvcreate, and you have created Physical Volume Groups, then YES you can mirror that.

For more information on the '-D' option see the lvcreate man page. And for more info on PVG's, see the vgcreate and lvmpvg man pages.
LoC_1
Frequent Advisor

Re: Mirroring a striped volume (again)

You should be able too,
Here is the rule
LVM striped logical volumes are always allocated using a strict
allocation policy. Consequently, striped logical volumes may only be
extended by a number extents that is a multiple of disks the logical
volume is striped across. For example, for a logical volume striped
across 3 disks, the logical volume will be extended in increments of 3
extents, with each of the 3 extents allocated on a different disk in
the volume group.
So for a 3 disk stripe, you would need 3 physical drives to mirror

Louis
Abhijit P.
Valued Contributor

Re: Mirroring a striped volume (again)

Hi Massimo,

If lvol is striped over several disk. In
order to extend a logical volume all involved disks have to have equal amount
of free space available.

While extending the Mirror we have to specify all the disks. Aa single disk would complain about the strict allocation policy. You cannot turnoff this policy when
striping. This prevents you from striping to the same disk. This is an lvm limitation.

After confirming the no of physical volumes involved in the striping and No of PEs available on all the disks you can proceed with mirroring , I don't feel there will be any issue if enough space is available all all Disks.

Regards,
Abhijit
Patrick Wallek
Honored Contributor

Re: Mirroring a striped volume (again)

No, No, No.

HP-UX LVM absolutely does NOT support mirroring of LV's striped with normal striping options (the '-i' and '-I' options used with lvcreate).

Distributed striping is your only option with HP-UX LVM.

Now, if you were to use VxVM (Veritas Volume Manager) then I believe this is possible.
Chauhan Amit
Respected Contributor

Re: Mirroring a striped volume (again)

Is it possible to mirror an existing striped lvol ??

Answer is No.

However -D y option can be used to create EXTENT-BASED MIRRORED STRIPES, here is the example.
Assume that volume group /dev/vgtest has two physical volume groups:pvg1, pvg2.
Assume that each physical volume group has 2 physical volumes. Assume that the first physical volume in each pvg has 3 extents free and the second physical volume in each pvg has 2 extents free.
The following command creates a logical volume in vgtest with EXTENT-BASED MIRRORED STRIPES:

lvcreate -D y -s g -m 1 -l 5 /dev/vgtest

The distributed allocation proceeds as follows:
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ Mirrors for the five extents are then allocated from the
free extents in pvg2 in a similar manner.
If you are not a part of solution , then you are a part of problem
Adisuria Wangsadinata_1
Honored Contributor

Re: Mirroring a striped volume (again)

Hi Massimo Bianchi,

Check the url below (docID : KBRC00012000) about 'Discussion of disk striping vs mirroring differences' :

http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000079996774

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Massimo Bianchi
Honored Contributor

Re: Mirroring a striped volume (again)

So the final answer is that it's impossible to mix the "real" striping ( -i -I ) with mirroring ( -m 1 ) .. The only way to have a kind of striping while mirroring is to use the -D flag to stripe the PEs on the PVs. I'm not talking about vxvm or other strange things but only about the good old LVM :-)

Any other idea should be supported by a link or a document on the topic :-)

ThX a lot for your help !!