System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: LVM mirror configuration

 
SOLVED
Go to solution
Md. Zubair Hoque
Occasional Advisor

Re: LVM mirror configuration

Please see the attached. This is just an example. Depending on this make your plan according your system configuration.
avizen9
Esteemed Contributor

Re: LVM mirror configuration

attached steps for mirroring go through it, thanks,
Kranti Mahmud
Honored Contributor

Re: LVM mirror configuration

Hi Senthil,

Attached is the document all about LVM.

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
R.K. #
Honored Contributor

Re: LVM mirror configuration

Hello Senthil,

Please find the attached doc that I use in case of disk replacements.

Regds,
R.K.
Don't fix what ain't broke
Suraj K Sankari
Honored Contributor

Re: LVM mirror configuration

HI,
>>Do we need to create LVM mirroring in two different PV?

YES

>># lvcreate -L 1000 /dev/vg01/lvol3 /dev/dsk/c3t2d0
>># lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c5t1d2
>>Am i correct?

Yes you are correct make sure about disk /dev/dsk/c5t1d2


>>And if one mirror disks fail, then how to replace the mirroring to new disk?

First make sure which disk you are going to replace root disk or not root disk according to you need to plan for more detail see the attached file When_Good_Disks_Go_Bad.pdf.


Suraj

senthil_kumar_1
Super Advisor

Re: LVM mirror configuration

Hi

If it is not boot disk then we can do as follows.

1) First removing the mirror lvm from disk:

#lvreduce -m 0 /dev/vg01/lvol3 /dev/dsk/c5t1d2

2) removing the disk from vg01:

#vgreduce /dev/vg01 /dev/dsk/c5t1d2

3) Adding new disk as physical disk

#pvcreate -f /dev/rdsk/c3t6d0

4) Including new disk into vg.

#vgextend /dev/vg01 /dev/dsk/c3t6d0

5) To create new mirror:

# lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c3t6d0


Are my steps correct?

R.K. #
Honored Contributor

Re: LVM mirror configuration

If the disks are of same size, you can simply do a vgcfgrestore and then vgsync.
Replacing non-root disks is the same on Itanium or PA-risc. Use the following procedure:

# pvcreate /dev/rdsk/cXtXdX
# vgcfgrestore -n vgXX /dev/rdsk/cXtXdX
# vgchange -a y vgXX
# vgsync vgxx
# vgdisplay -v /dev/vgxx (To verify the results)
Don't fix what ain't broke
Johnson Punniyalingam
Honored Contributor

Re: LVM mirror configuration

1) First removing the mirror lvm from disk:

#lvreduce -m 0 /dev/vg01/lvol3 /dev/dsk/c5t1d2

2) removing the disk from vg01:

#vgreduce /dev/vg01 /dev/dsk/c5t1d2

3) Adding new disk as physical disk

#pvcreate -f /dev/rdsk/c3t6d0

4) Including new disk into vg01

#vgextend /dev/vg01 /dev/dsk/c3t6d0

5) To create new mirror:

# lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c3t6d0

above steps are correct. but

if its already mirrored and you are changing the faulty mirror disk. you no need to do "lvextend -m" to remirror again.

Just follow belows :-

# pvcreate /dev/rdsk/cXtXdX
# vgcfgrestore -n vgXX /dev/rdsk/cXtXdX
# vgchange -a y vgXX
# vgsync vgxx

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Steven E. Protter
Exalted Contributor

Re: LVM mirror configuration

Shalom,

Response to your last query.

See this document:
http://www.hpux.ws/?p=21

Minor variations for 11.23 or 11.31.

Note many modern servers have hardware mirroring which lowers system load. This can eliminate the need for software mirroring.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
johnsonpk
Honored Contributor

Re: LVM mirror configuration

Hi Senthil/Suraj :

Reg:>># lvcreate -L 1000 /dev/dsk/c3t2d0

>># lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c5t1d2

There is no way to specify the PV during lvcreation as far as I know..so you may need to follow the below steps to control the LE on the disks as per your wish..

1)Create a logical volume with size 0
#lvcreate -n lvol3 /dev/vg01
2)extend the lv to the disk you desired with correct size
#lvextend -L 1000 /dev/vg01/lvol3 /dev/dsk/c3t2d0
3)create a mirror copy in the scond disk
# lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c5t1d2

There is many ways to archive this ..one way is to use the lvmpvg and create lv with pvg strict policy


Thanks!!
Johnson