Operating System - HP-UX
1752379 Members
6190 Online
108788 Solutions
New Discussion юеВ

Re: LVM mirror configuration

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

LVM mirror configuration

Hi

I have following questions

1) what is the purpose of LVM mirroring?
2) how to configure LVM mirroring?
3) how to view whether LVM mirroring is configured?

pls explain me in detail
47 REPLIES 47
Torsten.
Acclaimed Contributor

Re: LVM mirror configuration

Hi,

1) to have a current copy of data if a disk go bad

2) see appendix here:
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf


3) use
lvdisplay -v /dev/vg__/lvol__
and look for "mirror copies".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Ganesan R
Honored Contributor

Re: LVM mirror configuration

Hi Senthil kumar,

>>1) what is the purpose of LVM mirroring?<<
Redundancy. If primary disk fails system continue to run with mirror disk.

>>2) how to configure LVM mirroring?<<
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad_WP.pdf

see the appendix section on the above link

>>3) how to view whether LVM mirroring is configured?<<

look at these in lvdisplay output.

Current LE 25
Allocated PE 50

Allocated PE is double of Current LE then it is mirrored.
Best wishes,

Ganesh.
Jeeshan
Honored Contributor

Re: LVM mirror configuration

>>1) what is the purpose of LVM mirroring?

Makes it possible to maintain multiple images of each LV.provides scalibility. enabling online backup
>>2) how to configure LVM mirroring?

If you are creating a new LV use standard lvcreate command with -m option. for more info see the man page

>>3) how to view whether LVM mirroring is configured?

The lvdisplay command let you to display the LV mirroring. There are headers like "Mirror copies"
a warrior never quits
Ganesan R
Honored Contributor

Re: LVM mirror configuration

Hi Again,

LVM document..

http://docs.hp.com/en/5992-4589/5992-4589.pdf

Goto page no 52 to learn add and remove mirrors
Best wishes,

Ganesh.
Ivan Krastev
Honored Contributor

Re: LVM mirror configuration

You can config LVM mirroring (add/remove mirror) with lvextend - http://www.docs.hp.com/en/B2355-90691/lvextend.1M.html

Up to 2 mirrors are possible.

For check use lvdisplay:
#lvdisplay /dev/vg00/lvol3 | grep Mirror
Mirror copies 1


regards,
ivan
ROCK_10
Advisor
Solution

Re: LVM mirror configuration

Hello Senthil,

Please find the answer for your requested question
1) what is the purpose of LVM mirroring?
Ans:Two provide redundancy, reliability and availability of data.

2) how to configure LVM mirroring?

Note: Data mirroring is provided by an additionnal purchasable
software product called MirrorDisk/UX.

Note: the following example is using the volume group vg01 and the
logical volume lvhome

To add a mirror to an existing logical volume:
lvextend -m 1 /dev/vg01/lvhome

This will add 1 mirror (2 copies of the filesystem).
To add 2 mirrors (3 copies of the filesystem) use -m 2 instead.

To create a new logical volume of 200M with 1 mirror:
lvcreate -m 1 -L 200 /dev/vg01

3) how to view whether LVM mirroring is configured?

lvdisplay -v /dev/vg01/lvhome

this gives you a output which will show mirror copy.

LV Name
VG Name
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 120
Current LE 30
Allocated PE 60
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

In this output you can see number of mirror copy.

Thanks,

Rock



Torsten.
Acclaimed Contributor

Re: LVM mirror configuration

Additional information:

With hp-ux 11i v3 you can use either LVM ver. 1, 2.0 or 2.1 for your data, hence you can have up to

5 mirror copies:

http://docs.hp.com/en/lvm-v2/L2_whitepaper_8.pdf


More here:

http://docs.hp.com/en/oshpux11iv3.html#LVM%20Volume%20Manager

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
senthil_kumar_1
Super Advisor

Re: LVM mirror configuration

Hi Pals,

Now i understood LVM mirroring but still i have some questions.


1) Is there any file will be created for mirrored LVM like original "/dev/vg00/lvhome"?

2) Data of the original LVM partition will be stored in mirrored LVM after creating mirrored LVM?

3) will both original and mirrored LVM reside in same Physical Volume or in different volumes?

4) you said that mirror LVM comes to effect when original LVM fails. at this situation
how to view that original LVM has failed?





James R. Ferguson
Acclaimed Contributor

Re: LVM mirror configuration

Hi:

> 1) Is there any file will be created for mirrored LVM like original "/dev/vg00/lvhome"?

No, the normal device files handle all access.

2) Data of the original LVM partition will be stored in mirrored LVM after creating mirrored LVM?

Yes, that's the concept of "mirroring". Replication first occurs when you 'lvextend' with the '-m' option or when you issue a '(vg|lv)sync' to update stale extents.

3) will both original and mirrored LVM reside in same Physical Volume or in different volumes?

The better reside in separate physical volumes! If they don't, you have turned off the 'strict' allocation policy and thereby allowed mirrored extents to reside on the same physical volume. This wholly defeats the high-availability goal of mirroring --- if a physical volume fails and all mirrored extents reside on it, then you might as well never mirrored!

4) you said that mirror LVM comes to effect when original LVM fails. at this situation
how to view that original LVM has failed?

If you do 'lvdisplay -v /dev/vgNN/lvolX' and you see "stale" instead of "current" on any extent, then the associated physical volume has an out-of-date extent and likely has had a hardware failure. See however, the aformentioned "When Disk Go Bad" whitepaper.

Regards!

...JRF...