cancel
Showing results for 
Search instead for 
Did you mean: 

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
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...
Torsten.
Acclaimed Contributor

Re: LVM mirror configuration

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

A: the mirror works below the LVOL level, so what you see there is unchanged

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

A: it will be a current copy; if you write something, the system will write to both disks

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

A: up to you; but it should be a different disk

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

A: vgdisplay will show extends as "stale"; disk as "unavailable"



You should take some time and read about the LVM basics using the links provided earlier in this thread.

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 again,
1) Is there any file will be created for mirrored LVM like original "/dev/vg00/lvhome"?

No

2) Data of the original LVM partition will be stored in mirrored LVM after creating mirrored LVM?
Yes. you are right. As soon as you give the mirror command LVM starts synchronize the data with mirror

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

That depends. If lv is strict allocated then mirror will go to another disk. If it is not strict allocated , it may reside on the same disk.

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 give lvdisplay -v lvname command, will give status of PE's . if one disk failed then all PE from that disk will be shown as stale instead of current.
Best wishes,

Ganesh.
jaivinder
Frequent Advisor

Re: LVM mirror configuration

Here are the answers:
1. The main purpose of the LVM mirroring is to make data highly available , mirroring creates copies of data on the other disk in the group. We usually create the root disk mirrors in HPUX so the in case of failure we can keep our system up and running. HP LVM is one of the best in unix systems.In HP LVM we configure the RAID 1. It is costly to configure mirroring because it only gives 50% of the total disk space.
2.To configure the LVM mirroring you require the HP Mirror UX software to be installed on the server.To configure the LVM mirroring you need to have to disk in the system.
If you are setting up root disk mirror then
you need to copy all boot are and utilities on the other disk,and after that add the disk into the VG00 and the use lvexted command and use -m and provide number of mirrors accoring to your need. Once you exted the LVs do a vgsync and you are done with this.
3. To check the LVM configuration check the vgdisplay and lvdisplay . It will show you the status of mirror.See the below output:
[root@tstmqs01:/]# lvdisplay -v /dev/vg00/lvroot |more
--- Logical volumes ---
LV Name /dev/vg00/lvroot
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1024
Current LE 32
Allocated PE 64
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t1d0s2 32 32
/dev/dsk/c3t0d0s2 32 32

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t1d0s2 00144 current /dev/dsk/c3t0d0s2 00144 current
00001 /dev/dsk/c2t1d0s2 00145 current /dev/dsk/c3t0d0s2 00145 current
00002 /dev/dsk/c2t1d0s2 00146 current /dev/dsk/c3t0d0s2 00146 current
00003 /dev/dsk/c2t1d0s2 00147 current /dev/dsk/c3t0d0s2 00147 current
00004 /dev/dsk/c2t1d0s2 00148 current /dev/dsk/c3t0d0s2 00148 current
00005 /dev/dsk/c2t1d0s2 00149 current /dev/dsk/c3t0d0s2 00149 current
00006 /dev/dsk/c2t1d0s2 00150 current /dev/dsk/c3t0d0s2 00150 current
00007 /dev/dsk/c2t1d0s2 00151 current /dev/dsk/c3t0d0s2 00151 current
00008 /dev/dsk/c2t1d0s2 00152 current /dev/dsk/c3t0d0s2 00152 current
00009 /dev/dsk/c2t1d0s2 00153 current /dev/dsk/c3t0d0s2 00153 current
00010 /dev/dsk/c2t1d0s2 00154 current /dev/dsk/c3t0d0s2 00154 current
00011 /dev/dsk/c2t1d0s2 00155 current /dev/dsk/c3t0d0s2 00155 current
00012 /dev/dsk/c2t1d0s2 00156 current /dev/dsk/c3t0d0s2 00156 current
00013 /dev/dsk/c2t1d0s2 00157 current /dev/dsk/c3t0d0s2 00157 current
00014 /dev/dsk/c2t1d0s2 00158 current /dev/dsk/c3t0d0s2 00158 current
00015 /dev/dsk/c2t1d0s2 00159 current /dev/dsk/c3t0d0s2 00159 current
00016 /dev/dsk/c2t1d0s2 00160 current /dev/dsk/c3t0d0s2 00160 current
00017 /dev/dsk/c2t1d0s2 00161 current /dev/dsk/c3t0d0s2 00161 current
00018 /dev/dsk/c2t1d0s2 00162 current /dev/dsk/c3t0d0s2 00162 current
It is showing the status of every LE. It show the current status for a healthy LE and it will show stale in faulty LE.
Sajjad Sahir
Honored Contributor

Re: LVM mirror configuration



Dear Senthil

in simple words,

mirroring means exact copy in second disk
if u are looking a mirror what u will see
the same concept

MirrorDisk/UX

once this software product is available in u system u can start mirroring

for doing mirroring
u can use -m option with lvcreate see above
positng after -m option u have to give
how many number of mirroing u need

for removing mirroring u can use lvreduce command

please the above posting, i believe they covered all u area, so no scope to mention the same thing again

thanks and regards

Sajjad Sahir
senthil_kumar_1
Super Advisor

Re: LVM mirror configuration

How to find whether Mirrordisk/UX is installed or not?
inukoti
Frequent Advisor

Re: LVM mirror configuration

hi senthil,

swlist-l product | grep -i mirror

should give the package if not its not installed.

bobby
senthil_kumar_1
Super Advisor

Re: LVM mirror configuration

Hi

can we not do mirroring with out MirrorDisk/UX?

Is it possible
Bijeesh
Respected Contributor

Re: LVM mirror configuration

Hi
You can see if the MirrorDisk UX is installed or not using

#swlist | grep -i mirror
If it is not installed in your system,it is not possible to do this.


Sajjad Sahir
Honored Contributor

Re: LVM mirror configuration


Dear Senthil

for seeing software product installed u
can use the following command

swlist -l product | grep -i mirrordisk/ux


thanks and regards

Sajjad Sahir

Avinash20
Honored Contributor

Re: LVM mirror configuration

sENTHIL : "can we not do mirroring with out MirrorDisk/UX?"

Mirror-UX is a licensed purchasable software and does not come with the Foundation OE.
(I believe in 11iv3 it comes by default)

"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Avinash20
Honored Contributor

Re: LVM mirror configuration

You could have an option of Hp's DRD enable which is available for free download.

Please refer http://docs.hp.com/en/DRD/infolib.html

Its a very good product :)

Download from
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=DynRootDisk
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
senthil_kumar_1
Super Advisor

Re: LVM mirror configuration

Hi

how to view whether Hp's DRD is enabled or not enabled?

Johnson Punniyalingam
Honored Contributor

Re: LVM mirror configuration

>>how to view whether Hp's DRD is enabled or not enabled?<<

you can check by 'swlist" command if have DRD has been Installed.

swlist -l product |grep -i DynRootDisk

Tips for Using DRD with update-ux

When you are using DRD to update the inactive image within HP-UX 11i v3 releases:

Before you clone your system, download the latest version of DRD to enable the update-ux functionality. (See Download DRD and Patches for details.)

If your starting point is earlier than HP-UX 11i v3 update 2, DRD will check to make sure you have HP-UX Software Manager (SWM) version A.3.1.0.1027 or later installed on the active image. The update process will not continue unless SWM version A.3.1.0.1027 (or later) is installed on the active image.

If you have an older version of SWM on your active image and need to install SWM version A.3.1.0.1027 (or later), HP recommends that you install SWM either at the same time as the latest version of DRD, or after. You will encounter problems with the dependency both products have on SW-DIST if SWM is installed prior to DRD.

If you have version A.1.0.15.18 of HP-UX Software Assistant (SWA) installed on your system, you must remove it. You can then reinstall the latest version of this tool. Removal of this tool will allow the update process to install the appropriate software from the update source depot. You are most likely to find this version if your starting point is HP-UX 11i v3 initial release. To reinstall SWA, go to the HP-UX Software Assistant page (http://www.hp.com/go/swa) to download the SWA software and get installation instructions.




Thanks,
Johnson



Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: LVM mirror configuration

Hi Senthil kumar,

You can also check below links ,

http://docs.hp.com/en/DRD/faq.html

» 1. General
» 2. Using Dynamic Root Disk Commands
» 3. Troubleshooting Dynamic Root Disk


Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Avinash20
Honored Contributor

Re: LVM mirror configuration

"how to view whether Hp's DRD is enabled or not enabled?"

Its not installed by default

You need to install the product as stated above and configure it !!
"Light travels faster than sound. That's why some people appear bright until you hear them speak."