System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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...
The Gunners
Regular Advisor

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

Hi again Mel,
Yes it did complete successfully (as in no error returned) Have re-run it to just confirm

dubhptst: # pvcreate -B /dev/rdsk/c2t0d0
dubhptst: #
Lijeesh N G_1
Respected Contributor

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

Hi,

1) 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
==>You should use block device file name,
ie, #vgextend /dev/vg00 /dev/dsk/c2t0d0

2) 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
==>What output you got while running pvcreate -B /dev/rdsk/c2t0d0 ??

Regards,
LIJEESH N G
Mel Burslan
Honored Contributor

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

By running it and completing the command successfully, you have obliterated whatever was previously on this volume. If you run

vgextend /dev/vg00 /dev/dsk/c2t0d0

do you still get the same error ?
________________________________
UNIX because I majored in cryptology...
Lijeesh N G_1
Respected Contributor

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

Try with #pvcreate -fB /dev/rdsk/c2t0d0
The Gunners
Regular Advisor

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

Hi Mel/Lijeesh,

Tried the commands as suggested and still the same , v strange

dubhptst: # vgextend /dev/vg00 /dev/dsk/c2t0d0
vgextend: Couldn't open physical volume "/dev/dsk/c2t0d0":
Device busy
dubhptst: # pvcreate -fB /dev/rdsk/c2t0d0
dubhptst: # vgextend /dev/vg00 /dev/dsk/c2t0d0
vgextend: Couldn't open physical volume "/dev/dsk/c2t0d0":
Device busy

Mel Burslan
Honored Contributor

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

This is really strange. Just out of curiosity, could you check and post the output of following commands:

vgdisplay -v vg00
ioscan -fnC disk
fuser -c /dev/dsk/c2t0d0
fuser -f /dev/dsk/c2t0d0

________________________________
UNIX because I majored in cryptology...
Lijeesh N G_1
Respected Contributor

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

Also,

#diskinfo /dev/rdsk/c2t0d0
#strings /etc/lvmtab
#dd if=/dev/rdsk/c2t0d0 of=/dev/null bs=1024 count=50
The Gunners
Regular Advisor

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

Hi again , here attached is the about from both sets of commands
Lijeesh N G_1
Respected Contributor

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

dubhptst: # diskinfo /dev/rdsk/c2t0d0
SCSI describe of /dev/rdsk/c2t0d0:
vendor: HP 73.4G
product id: ST373454LC
type: direct access
size: 0 Kbytes <<<======Size is "0"******
bytes per sector: 0


I think issue with Hard disk.
Mel Burslan
Honored Contributor

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

Davey,

look at the size of this disk reported by diskinfo command below:

dubhptst: # diskinfo /dev/rdsk/c2t0d0
SCSI describe of /dev/rdsk/c2t0d0:
vendor: HP 73.4G
product id: ST373454LC
type: direct access
size: 0 Kbytes
bytes per sector: 0

there is something wrong with this disk. it needs to report 74GB like ioscan says it is. You need to contact hardware support and have it checked/replaced ASAP.

________________________________
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 Folks, Gosh v surprised at this one . There are no error lights on the disk itself , I also reseated the disk , and green light flickering in the usual way (you know when you re-seat it looks like it rebuilds back into the system) , this completes fine as well. Is there any other thing we can try - Im still baffled by the 'device busy' error. Would this suggest that something is hanging onto this particular disk (btw I rebooted this morn as well after the reseat)
Mel Burslan
Honored Contributor

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

Davey,

After re-seating it and rebooting the server, if the diskinfo is reporting bytes size for this disk drive, you have dead hardware in your hands. The indicator lights and output of ioscan, usually shows you the status of the onboard controller for the disk device. If the controller's firmware is not registering an erroneous condition in the platters or mechanics, the disk may look fine to you and the system while it is effectively useless dead weight. If you still see the dreaded 0 bytes size, it is time to call in for hardware service. Otherwise, i.e., you see the actual size of the device on the output of diskinfo command, go through the steps in the procedure above to build your mirror disk.

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

Thanks again Mel,
Yea same story with the 'diskinfo' command after the reboot , even tried another pvcreate -fB and then another 'diskinfo' and same result. I will get onto the support side and get a new disk in as soon as I can , and follow up on this thread. Thanks everyone for all the help so far
The Gunners
Regular Advisor

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

Hi All , have taken your advice , and after much back and forward , we found that it is under warranty , so have ordered a replacement disk. Will update on how it is looking when I slot new disk in , and see if I can finish out this task
The Gunners
Regular Advisor

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

Thanks everyone , got my disk replaced / and have followed all your great advice as of above. Did a reboot and hey presto!!!! The lights on both disk are now flicking as it executes commands , which proves to me that they are mirrored now. Thanks a mill for all the invaluable help and knowledge as always.