Operating System - HP-UX
1847892 Members
1615 Online
104021 Solutions
New Discussion

Re: mirrored system disk replacement procedure question

 
Cara Tock
Regular Advisor

mirrored system disk replacement procedure question

A HP CE came onsite yesterday to replace a failing mirror system disk.

- I was able to break the mirrors for each logical volume.

ie.
lvextend -m 0 /dev/vgxx /dev/dsk/c2t2d0

HP CE recommended that I perform the next step, vgreduce command below, due to this hot swappable mirror disk volume group, vg00, containing logical volumes with Oracle binaries in it.

- I was not able to perform a vgreduce to remove the special device (mirror disk) from vg00 (system disk volume group).

ie. vgreduce /dev/vg00 /dev/dsk/c2t2d0 (system mirror disk)

From the HP "BreakMirror.txt" instructions that HP provided me, I do not need to perform a "vgreduce" for the system mirror disk.

Please advise if breaking the logical volume mirrors is enough or do I need to also perform a "vgreduce" to reduce the system mirror disk out of the volume group.

Thank you in advance for your assistance.

6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: mirrored system disk replacement procedure question

Shalom,

vgreduce -f

May be helfpul.

follow the instructions displayed after the command.

then pvcreate,lvextend, etc.

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
Rainer von Bongartz
Honored Contributor

Re: mirrored system disk replacement procedure question

Take a look at the software recovery handbook under the chapter 'Replacing a faild LVM disk'


http://www4.itrc.hp.com/service/iv/docDisplay.do?docId=prodITRC/DE_SW_UX_swrec_EN_01_E/LVM.pdf

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Pete Randall
Outstanding Contributor

Re: mirrored system disk replacement procedure question

Or take a look at this excellent doc from HP:

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf


Pete

Pete
Vipulinux
Respected Contributor

Re: mirrored system disk replacement procedure question

Hi
Pls have a look this might be useful:
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2005-05/0010.html

Cheers
Cara Tock
Regular Advisor

Re: mirrored system disk replacement procedure question

Thank you all for your responses.

I am reviewing all of the documentation/responses now and will be assigning points later on.
Geoff Wild
Honored Contributor

Re: mirrored system disk replacement procedure question

Two ways to replace:

1) If the disk is completely "dead", such as if you run ioscan and status is "no_hw" then you can hot swap the disk online.

2) However in circumstances where the disk has not fully failed please do one of the following to avoid data corruption :

a) reduce mirror before replacing the disk
b) deactivate VG before replacing the disk
c) shutdown system to replace the disk


For # 1 - this is fine:

After failed disk has been replaced by HP (assuming the disk is c1t5d0):

vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t5d0

mkboot /dev/rdsk/c1t5d0

mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/c1t5d0

vgchange -a y /dev/vg00

lvlnboot -Rv /dev/vg00

vgsync /dev/vg00



For 2, reduce the lv by the mirrors and recreate:

Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0


Rgds...Geoff



Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.