1836535 Members
4800 Online
110102 Solutions
New Discussion

URGENT: Mirror question

 
Craig A. Sharp
Super Advisor

URGENT: Mirror question

We have an 18 Gb disk going bad...I have a new disk to replace the failing disk. I have an open slot on my 2405 that i can fit the new disk. I want to install the new disk, mirror the bad disk to the new disk and remove the bad disk. This should make the new disk primary. How do I safely do this? Can someone give me a procedure? This is a production system so this must be done live.
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: URGENT: Mirror question

Craig,

This procedure is designed for a root disk. If this is not a root disk, just use steps 2 and 4:


The steps to mirror your boot volume are:

1. Create a physical volume with a boot reserved area
"pvcreate -B /dev/rdsk/c1t6d0"

2. Add the physical volume to the root VG
"vgextend /dev/vg00 /dev/dsk/c1t6d0"

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/c1t6d0"
"mkboot -a "hpux -lq" /dev/rdsk/c1t6d0"

4. Use mkboot to update the AUTO file on the primary boot disk
"mkboot -a "hpux -lq" /dev/rdsk/c0t6d0"

5. Mirror the stand, root and swap logical volumes
"lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0"

6. Modify your alternate boot path
"setboot -a 8/8.6.0 # use the path of your new boot disk"

7. Edit /stand/bootconf and add your new mirrored boot disk.

That's all there is to it. You may notice that I left out any
lvlnboot commands. That is because they are not
necessary - see the man page:

"This command should be run in recovery mode (-R)
whenever the configuration of the root volume group is
affected by one of the following commands: lvextend,
lvmerge, lvreduce, lvsplit, pvmove, lvremove, vgextend,
or vgreduce (see lvextend(1M), lvmerge(1M), lvreduce(1M),
lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(1M), and
vgreduce(1M)). Starting with HP-UX Release 10.0, this is
done automatically."


Pete

Pete
Craig A. Sharp
Super Advisor

Re: URGENT: Mirror question

Ok, thanks....once the mirror is established, how to I safely remove the bad disk which was the primary disk?
Patrick Wallek
Honored Contributor

Re: URGENT: Mirror question

I think Pete meant use steps 2 & 5 if it is not a root disk.

You will probably need to do step 1 as well, but without the '-B' option. Just 'pvcreate /dev/rdsk/c?t?d0' should suffice.
RAC_1
Honored Contributor

Re: URGENT: Mirror question

If disk is going bad, you may not be able to mirror it. mirroring may fail. Do you have ignite backup of this disk??

Anyway, you can try.
You need to have Mirrororing software for this.
Put the disk in.
Make sure it is claimed in ioscan.

1) Initialize the disk and make it bootable

pvcreate -B /dev/rdsk/c1t6d0

Note: the -B parameter tell pvcreate that this will be a

bootable disk.

2) Add the physical volume to the volume group

vgextend /dev/vg01 /dev/dsk/c1t6d0

3) Use mkboot to place the boot utilities in the boot area and add the AUTO file.

mkboot /dev/dsk/c1t6d0

mkboot -a "hpux -lq" /dev/rdsk/c1t6d0

4) Use mkboot to update the AUTO file on the primary boot disk.

mkboot -a "hpux -lq" /dev/rdsk/c0t6d0

5) Mirror the stand, root and swap logical volumes

lvextend -m 1 /dev/vg00/lvol1

lvextend -m 1 /dev/vg00/lvol2

lvextend -m 1 /dev/vg00/lvol3

Note: LVM will resynchronize the new mirror copies. This step will takes several minutes

Repeat the lvextend for all other logical volumes on the boot mirror.

6) Modify your alternate boot path to point to the mirror copy of the boot disk.

setboot -a 8/8.6.0 # Use the Hardware path for your new boot disk.

Even if you do not have mirroring software, you can prepare the static copy of root disk. The procedure is slightly different.
There is no substitute to HARDWORK
Craig A. Sharp
Super Advisor

Re: URGENT: Mirror question

this is not a boot disk...I am taking a guess that I can just lvreduce the bad disk out of the mirror.
Patrick Wallek
Honored Contributor

Re: URGENT: Mirror question

Once mirrored, you can do a:

# lvreduce -m 0 /dev/vg??/lvol? /dev/dsk/c?t?d0

where the /dev/dsk/c?t?d0 is the device file for the disk that is going bad.

Once all mirrors are reduced, you can reduce the disk out of the VG.

# vgreduce /dev/vg?? /dev/dsk/c?t?d0
Pete Randall
Outstanding Contributor

Re: URGENT: Mirror question

Thanks, Patrick! Obviously I wasn't a math major.

;^)


Pete

Pete
Craig A. Sharp
Super Advisor

Re: URGENT: Mirror question

Ok disk is replaced but the ioscan is not seeing the hardware. This is an FC disk and I have done the fcmsutil /dev/td0 replace_dsk 0xd5 function. On ioscan we see

disk 11 0/2/0/0.8.0.255.0.8.0 sdisk NO_HW DEVICE HP 36.4GST336607FC
/dev/dsk/c4t8d0 /dev/rdsk/c4t8d0
Craig A. Sharp
Super Advisor

Re: URGENT: Mirror question

got it going