Operating System - HP-UX
1748227 Members
4249 Online
108759 Solutions
New Discussion

Re: How to add and remove mirror copies , when having 2 mirror copies ?

 
SOLVED
Go to solution
rveri-admin
Frequent Advisor

How to add and remove mirror copies , when having 2 mirror copies ?

Experts,

 

LVM version: 1.0    11.31  supports 2 mirror copy.

 

I want to replace both SAN boot disk to new SAN bootdisk  online with mirror-ux mirroring :  diskA_p2   diskB_p2    with  diskX_p2   diskY_p2.

 

Current bootdisks:  diskA_p2   diskB_p2 

New      boot disks: diskX_p2   diskY_p2 

 

 

1. Current disks are mirrored to each other.

 

2. Want to perform as below steps:

A]-  add  first_target disk to mirror copy:  diskX_p2  :          i.e  +1 mirror_copy.

B]- remove first current disk diskB_p2 from mirror copy:  i.e -1 mirror_copy .

C]- add  2nd_target disk to mirror copy:  diskY_p2    :           i.e +1 mirror_copy.

D]- remove  2nd current disk  diskA_p2 from mirror copy: i.e  -1 mirror_copy.

 

 

- Can any one guide how the lvextend and lvreduce commands supposed to be,  for this.

 

 

Example about the step : 

A]   add  first_target disk to mirror copy:  diskX_p2  :

# Assuming lv 's are defined in variable $LV [ in format: /dev/vg00/lvol1  /dev/vg00/lvol2 ... ] 

for lv in $LVS ; do    lvextend -m 2 $lv diskX_p2   ;   done 

 

- At this position we will have  2 mirror copy ,  current pri disk (orig) + current alt disk (copy 1) + target_disk_first (copy 2 ).

 

 

Can any one walk through steps B] C] & D]   for the underlined command.  

 

 

Thanks, 

 

 

P.S> This thread has been moved from HP-UX > System Administration to HP-UX > LVM - HP Forum Moderator

 

 

 

 

4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: How to add and remove mirror copies , when having 2 mirror copies ?

First, I am assuming that you know all the other steps required to build a mirror disk on Itanium servers, i.e. using idisk to create the partitions, insf to create the partition device files, pvcreate, vgextend, mkboot, etc.

 

To address you mirror questions:

 

A) add  first_target disk to mirror copy: lvextend -m 2 /dev/vg00/lvol? /dev/disk/diskX_p2

B) remove first current disk diskB_p2 from mirror copy: lvreduce -m 1 /dev/vg00/lvol? /dev/disk/diskB_p2

C) add  2nd_target disk to mirror copy:  lvextend -m 2 /dev/vg00/lvol? /dev/disk/diskY_p2

D) remove  2nd current disk  diskA_p2 from mirror copy:  lvreduce -m 1 /dev/vg00/lvol? /dev/disk/diskA_p2

 

If you do a 'vgdisplay -v vg00' and/or and 'lvdisplay -v /dev/vg00/lvol?' between each step you should see the results of your actions.

rveri-admin
Frequent Advisor

Re: How to add and remove mirror copies , when having 2 mirror copies ?

Hi Patrick ,

 

Thank you for the quick response:..

Yes I am aware of the itanium mirror steps  and had only confusion with the mirror_copy steps. Thanks,

 

I am wondering why not  lvreduce -m 0 , instead of    lvreduce -m 1 . since we are specifying the disk.

 

B) remove first current disk diskB_p2 from mirror copy:    lvreduce -m 1 /dev/vg00/lvol? /dev/disk/diskB_p2

D) remove  2nd current disk  diskA_p2 from mirror copy:  lvreduce -m 1 /dev/vg00/lvol? /dev/disk/diskA_p2

 

 

The man page of lvreduce shows one example: 

Remove mirror copies of logical extents of a logical volume from the
physical volume /dev/dsk/c1t0d0:

lvreduce -m 0 /dev/vg01/lvol4 /dev/dsk/c1t0d0

 

 

 

- I am trying to understand if -m 0 means , reduce the mirror copy to 0 , for that disk

 

 

so wondering ,

can it be : lvreduce -m 0   ,  for step B] & D].  , instead of -m 1 

 

 

 

Thanks again. 

 

Patrick Wallek
Honored Contributor

Re: How to add and remove mirror copies , when having 2 mirror copies ?

>>- I am trying to understand if -m 0 means , reduce the mirror copy to 0 , for that disk

 

No, it means reduce your TOTAL number of mirrors to '0'.

 

>>so wondering ,

>>can it be : lvreduce -m 0   ,  for step B] & D].  , instead of -m 1

 

No!  You need to use '-m 1'.  The '-m 1' tells Mirror Disk to reduce your Total Number of mirrors from 2 to 1 and to reduce it off of the disk you specify.

rveri-admin
Frequent Advisor

Re: How to add and remove mirror copies , when having 2 mirror copies ?

Great ,  Thank you for quick response, 

Thank you Mr. Wallek for the help...