Operating System - HP-UX
1834307 Members
2695 Online
110066 Solutions
New Discussion

Re: Problem by swapping Bootdisk by using of Mirrordisk/UX

 
Stefan Beelen
Occasional Contributor

Problem by swapping Bootdisk by using of Mirrordisk/UX

Hi,

I've installed here a rx2600 with mirrordisk/UX on it. I can boot from both disks. (c2t1d0=bootdisk, c2t0d0=mirrordisk).
Now I 've booted from the mirror disk and I tried to bring a new disk up and running but it does not work. Has somebody a procedure for swapping a boot disk ( hot-plug or with a reboot).

Thanks in Advance,

Stefan
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Problem by swapping Bootdisk by using of Mirrordisk/UX

If its planned, prior to actually removing the first boot disk, you might want to do the following:

1) lvsplit to split all the logical volumes mirrored.
2) lvremove to remove the original logical volumes
3) vgreduce the original disk from vg00

Of course you may have plans for that original boot disk and this might not be a good solution.

Then the procedure is.

1) Shut down machine
2) Remove disk/replace
3) start system
4) mv /etc/lvmtab /etc/lvmtab.sav
5) vgscan to rebuild volume groups
6) pvcreate the new disk
7) vgextend vg00 to the new disk
8) lvextend -m 1 /dev/vg01/lvol3 /dev/dsk/c1t1d0

change item 8 to be the real disk

repeat for all volume groups.

Complete mirror procedure:
pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

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
setboot -a 52.1.0 # second disk

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
Sridhar Bhaskarla
Honored Contributor

Re: Problem by swapping Bootdisk by using of Mirrordisk/UX

Hi Stefan,

'vgcfgrestore' is the key to this process.

1. Replace the disk. Run 'ioscan -f' to make sure the disk is recognized.

2. Restore the LVM headers

vgcfgrestore -n vg00 /dev/rdsk/cxtydz

3. vgchange -a y vg00


Steps 4 and 5 make it bootable.

4. mkboot /dev/rdsk/cxtydz

5. mkboot -a "hpux -lq" /dev/rdsk/cxtydz

6. Sync up the LVs

vgsync vg00

(it may take a long time here)

7. Update the BDRA

lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -r /dev/vg00/lvol3
lvlnboot -d /dev/vg00/lvol2

(Your lvols may be different)

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Suresh Patoria
Super Advisor

Re: Problem by swapping Bootdisk by using of Mirrordisk/UX

Hi,

If u want to boot with mirror disk then

u have to mirror EFI shell partition and HP service partition.

without that u wan't able to boot with second disk

so u mirror the 3 partition
1)EFI shell partition
2)HP-UX OS
3)HPSP (HP service partition)

Thanx
Suresh P.