Operating System - HP-UX
1752579 Members
4026 Online
108788 Solutions
New Discussion юеВ

Re: mirror root disk using a disk already used by a different vol group

 
Annelise Wilken
Regular Advisor

mirror root disk using a disk already used by a different vol group

I have an rp5450 with 4 internal disks - one of the disks is used for vg00 (root vol), the other disks are data disks. I have been asked to make one of the other disks a mirror of the root disk; so I've backed the disk up and have relocated the data onto an external disk.
I now plan to mirror the root disk on to this other disk as follows:

root disk: /dev/dsk/c1t2d0
mirror disk: /dev/dsk/c2t2d0

1. Because the disk that will become the root mirror already had data on it and belonged to a different volume group, I will need to remove the logical volume (there is only 1 log.vol on this disk)from the volume group (vg01), remove the physical volume from the volume group and remove the volume group:

umount /disk01
lvremove /dev/vg01/disk01
vgreduce vg01 /dev/dsk/c2t2d0
vgremove /dev/vg01

Or should I just unmount the log vol and remove it then deactivate it and export it?

umount /disk01
lvremove /dev/vg01/disk01
vgchange тАУa n vg01
vgexport vg01

Once done I then plan on mirroring it as follows:

2. Create a physical volume with a boot reserved area onto the mirror disk:

pvcreate тАУB /dev/rdsk/c2t2d0

3. Add the physical volume to the root volume group:

vgextend /dev/vg00 /dev/dsk/c2t2d0

4. Use mkboot to place the boot utilities in the boot area and add the AUTO file:

mkboot /dev/rdsk/c2t2d0
mkboot тАУa тАЬhpux тАУlqтАЭ /dev/rdsk/c2t2d0

5. Use mkboot to update the AUTO file on the primary bootdisk:

mkboot тАУa тАЬhpux тАУlqтАЭ /dev/rdsk/c1t2d0

6. Mirror the stand; swap and root logical volumes:

lvextend тАУm 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0

Mirror all other logical volumes that were on the root disk:

lvextend тАУm 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0
lvextend тАУm 1 /dev/vg00/disk00 /dev/dsk/c2t2d0

7. Update the BDRA and LABEL file:

lvlnboot тАУR /dev/vg00

8. Modify the alternative boot path to point to the copy boot disk:

setboot тАУa (path of new boot disk)

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

Thats it I think, or have I missed anything?

As always - many thanks for advice!
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: mirror root disk using a disk already used by a different vol group

Hi,

Also add updatediaglig command to your list otherwise the systems will not boot of the other disk.

Also does vg01 only contain this one disk and one volume if yes the procedure is correct. If not exporting the VG will make other volumes also unavailable and you should use vgreduce instead.

Also you will be required to use -f option with pvcreate.

HTH,
Devender
Impossible itself mentions "I m possible"
Annelise Wilken
Regular Advisor

Re: mirror root disk using a disk already used by a different vol group

Thanks for the prompt reply - sorry but I'm not familiar with `updatediaglig` - whats this???

Yes vg01 contains only one disk, one logical volume and one volume group.

Patrice Le Guyader
Respected Contributor

Re: mirror root disk using a disk already used by a different vol group

Hi,

For 1) you just have to umount,vgchange -a n and to vgexport -v -f file.dsk.
As you need to pvcreate -f your disk before putting it in vg00, making a file with disks in it can help.

Here is doc which can help you.

Hope this help.
Pat

Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Devender Khatana
Honored Contributor

Re: mirror root disk using a disk already used by a different vol group

Hi,

It is not required now as it is taken care by mkboot -b. The command used in earlier versions was

#mkboot -b /usr/sbin/diag/lif/updatediaglif2 \
-p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/cxtydz

Confirm the contents on lif on both disks by
#lifls /dev/rdsk/cxtydz


HTH,
Devender
Impossible itself mentions "I m possible"
Annelise Wilken
Regular Advisor

Re: mirror root disk using a disk already used by a different vol group

Thanks for the replies, I think my procedure will work and I'm good to go!!


Cheers!