Operating System - HP-UX
1753797 Members
7240 Online
108799 Solutions
New Discussion юеВ

Re: How to mirror a logical volume ?

 
amreek bansal
Frequent Advisor

How to mirror a logical volume ?


Hi everyone,

I have a question about mirroring logical volumes, If anyone can help.

Background:

We have secondary swap set up on hp-ux server, I have a new disk which I'm going add to the server. I then want to use that new disk to mirror the secondary swap ?

Can any one provide the steps for carrying this out please ?

Thanks
17 REPLIES 17
avizen9
Esteemed Contributor

Re: How to mirror a logical volume ?

hello,
what you want to do?
you want to create mirror for swap? or all other lv? clarifiy, thanks,
James R. Ferguson
Acclaimed Contributor

Re: How to mirror a logical volume ?

Hi:

LVM mirroring occurs at the logical volume level. Given your description, add the new physical disk to the volume group on which your secondary swap lives. That is, 'pvcreate' the physical disk; and 'vgextend' it into the appropriate volume group.

Next, simply 'lvextend' with the '-m 1' option the logical volume that represents your secondary swap device.

See the manpages for more information.

Regards!

...JRF...
Michal Kapalka (mikap)
Honored Contributor

Re: How to mirror a logical volume ?

Hi,

at first you need a product Mirror/UX,

and if you have in your OE, you could mirror.

mikap
amreek bansal
Frequent Advisor

Re: How to mirror a logical volume ?


To clarify, I just want to create a mirror for swap in case of a disk failure on the disk which the secondary swap is on. I dont want to mirror any other logical volumes.

So currently my existing secondary swap sits on c1t2d0 in a logical volume, I have a new disk which I'm about to add to server and want to use this new disk to mirror the existing secondary swap.

Thanks
Michal Kapalka (mikap)
Honored Contributor

Re: How to mirror a logical volume ?

Hi,

so add the new disk to the VG pvcreate -f /.../rnewdisk ( vgextend ) and them use lvextend -m 1 .... .


mikap
Sajjad Sahir
Honored Contributor

Re: How to mirror a logical volume ?

Dear Amreek

first initialize a disk
1.pvcreate /dev/rdsk/c#t3d#
then extend the logical volume with mirroring
2.lvextend -m1 /dev/vg00/lvol1 /dev/dsk/C#t#d#

thanks and regards

Sajjad sahir
Sunny123_1
Esteemed Contributor

Re: How to mirror a logical volume ?

Hi

Why you are mirroring your swap?????

If you want then add new disk and use this disk as new secondary swap disk .Create swap disk by using swapon.

Regards
Sunny
Michal Kapalka (mikap)
Honored Contributor

Re: How to mirror a logical volume ?

Hi sunny123,

to prevent HW failure.

mikap
amreek bansal
Frequent Advisor

Re: How to mirror a logical volume ?


Guys, So from some of the replies, I'm doubting whether mirroring the secondary swap is actually needed? Can someone confirm this pls ... is it not normal practice to mirror secondary swap ? does it serve any purpose then ?

Thanks.