Operating System - HP-UX
1748123 Members
3410 Online
108758 Solutions
New Discussion юеВ

2 internal disks , one has operating system , want other to be a mirror as well

 
SOLVED
Go to solution
The Gunners
Regular Advisor

2 internal disks , one has operating system , want other to be a mirror as well

Hi there ,
I have an RP4410 Server with two internal disks. As far as I can make out the Operating system is on only one of them. I would like to include the other disk and create as a 'mirrored pair' for obvious resons , redundantncy etc. How should I go about this?. Here is the disk layout of the two disks :
0/1/1/0.0.0 1 LVM -- 0 HP 73.4GST37345 тФВ
тФВтФВ 0/1/1/0.1.0 1 LVM vg00 70007 HP 73.4GST37345




25 REPLIES 25
Lijeesh N G_1
Respected Contributor
Solution

Re: 2 internal disks , one has operating system , want other to be a mirror as well

Hi,

==>1st make sure that, mirror software is installed by,
#swlist -l product|grep -i mirror

==>Follow the below procedure to mirror,

Mirroring in PA-RISC servers.
==============================

1. Create a bootable LVM disk to be used for the mirror.
****In this eg. /dev/rdsk/c3t6d0 is disk, you should replace with your actual disk.***

#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.

#lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0

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

#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

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 <<<====Primary boot disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk <<<====Alternate 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

9) Update NVRAM for the alternate/high availability boot disk and verify,
#setboot -h
#setboot



Regards,
LIJEESH N G

Mel Burslan
Honored Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

# this assumes you are using hpux V 11.11
# process may work on 11.23 but not for sure

# modify next two lines according to the
# device paths of your disk you want to be the mirror
mirrdisk_raw=/dev/rdsk/c0t1d0
mirrdisk_blk=/dev/dsk/c0t1d0

pvcreate -B ${mirrdisk_raw}

mkboot -a "hpux -lq (;0)/stand/vmunix" ${rootdisk_raw}
mkboot -l ${mirrdisk_raw}
mkboot -a "hpux -lq (;0)/stand/vmunix" ${mirrdisk_raw}
cd /usr/sbin/diag/lif
mkboot -b updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL ${rootdisk_raw}
mkboot -b updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL ${mirrdisk_raw}

vgextend /dev/vg00 ${mirrdisk_blk}

#this 'for' block will take some time to run

for lvol in `vgdisplay -v vg00 | grep "LV Name" | awk {'print $3'}`; do
lvextend -m 1 $lvol ${mirrdisk_blk}
done

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v

setboot -a

hope this helps
________________________________
UNIX because I majored in cryptology...
R.K. #
Honored Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

Hi Davey,

Attached is the procedure.
Don't fix what ain't broke
R.K. #
Honored Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

And you can also refer "Appendix D : Procedures" in the attached doc.
Don't fix what ain't broke
The Gunners
Regular Advisor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

Hi Everyone / Li Jeesh NG , just going with your advice as a starter. came upon this error at the beginning
dubhptst: # pvcreate -B /dev/rdsk/c2t0d0
dubhptst: # vgextend /dev/vg00 /dev/rdsk/c2t0d0
vgextend: Physical volume "/dev/rdsk/c2t0d0" is not a block special file.
Usage: vgextend
[-f]
[-A Autobackup]
[-x Extensibility]
[-g PhysicalVoumeGroupName]
[-z SparePV]
VolumeGroupName PhysicalVolumePath...
"PhysicalVolumePath": must be a block special file.
James R. Ferguson
Acclaimed Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

Hi:

@ R.K. Why attach a document that is freely available on the HP website? Using a URL would potentially allow someone to see an updated document at a future date rather than stale information:

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

...JRF...
Mel Burslan
Honored Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

@Davey

>>dubhptst: # vgextend /dev/vg00 /dev/rdsk/c2t0d0
>>vgextend: Physical volume "/dev/rdsk/c2t0d0" is not a block special file.

The instruction given to you was written in a hurry obviously. vgextend needs block special file for the disk, not the raw device file as specified in that command. If you look at my procedure, you will see the specification mirrdisk_blk in the vgextend line, so you shuld have run:

vgextend /dev/vg00 /dev/dsk/c2t0d0

in your case.

HTH
________________________________
UNIX because I majored in cryptology...
The Gunners
Regular Advisor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

Hi Mel / All,
Just tried that - Hmmm , I have a feeling this second disk may have been used before and this is why I am getting the following
dubhptst: # vgextend /dev/vg00 /dev/dsk/c2t0d0
vgextend: Couldn't open physical volume "/dev/dsk/c2t0d0":
Device busy

I dont mind if I have to wipe it , could be a legacy of a previous issue I had on the server relating to disks / device busy etc that I resolved on the 'external' disks on the server. But I can wipe it so its not a prob. Whats the best way to do it ? I want to make sure I dont fry the wrong disk lol , or would be in serious trouble
Mel Burslan
Honored Contributor

Re: 2 internal disks , one has operating system , want other to be a mirror as well

How did the command

pvcreate -B /dev/rdsk/c2t0d0

go ? Did it complete successfully ? Notice the capital "B" not the lower case "b" as noted in the first response. They are not the same. If you initially executed it with lower case b, make sure you run the same command with capital B one more time. This is wat enables your mirror disk to be bootable.
________________________________
UNIX because I majored in cryptology...