How to mirror the root disk on a hp pa-risc hp-ux system?
-
Mirroring the root disk on an itanium hp systems and a pa-risc hp system differ, here only the pa-risc method is shown, look at the how to on itanium root disk mirroring for that type.
First determine your current root disk hardware path
# setboot Primary bootpath : 0/1/1/0.0.0 Alternate bootpath : 0/0/2/0.3.0 Autoboot is ON (enabled) Autosearch is ON (enabled)
By running the ioscan command you'll see that the alternate boot path is currently the dvd-rom, make a note of the root disk device paths.
# ioscan -fun -C disk
To check the number of disks being used for the root volume group run vgdisplay, here you see right at the end of the output the physical volumes used. This will determine if you have mirror only one disk or more. In this example we are mirroring one disk only.
# vgdisplay -v vg00 --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 18 Open LV 18 Max PV 8 Cur PV 1 Act PV 1 Max PE per PV 9200 VGDA 2 PE Size (Mbytes) 16 Total PE 4318 Alloc PE 3434 Free PE 884 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Logical volumes --- LV Name /dev/vg00/lvol1 LV Status available/syncd LV Size (Mbytes) 592 Current LE 37 Allocated PE 37 Used PV 1 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 16000 Current LE 1000 Allocated PE 1000 Used PV 1 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 1024 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol5 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol6 LV Status available/syncd LV Size (Mbytes) 1024 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol7 LV Status available/syncd LV Size (Mbytes) 8192 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol8 LV Status available/syncd LV Size (Mbytes) 512 Current LE 32 Allocated PE 32 Used PV 1 LV Name /dev/vg00/lvol9 LV Status available/syncd LV Size (Mbytes) 12000 Current LE 750 Allocated PE 750 Used PV 1 LV Name /dev/vg00/lvol10 LV Status available/syncd LV Size (Mbytes) 4096 Current LE 256 Allocated PE 256 Used PV 1 --- Physical volumes --- PV Name /dev/dsk/c1t7d0s2 PV Status available Total PE 4318 Free PE 884 Autoswitch On
Determine the h/w path and device name of an unused disk that will be the root mirror, again use ioscan, then run the following. Note your device could be different.
Create a physical volume, so the disk can be part of Logical Volume Manager (LVM).
# /usr/sbin/pvcreate -f -B /dev/rdsk/c1t0d0 Physical volume "/dev/rdsk/c1t0d0" has been successfully created.
Extend the disk into the root volume group
# /usr/sbin/vgextend /dev/vg00 /dev/dsk/c1t0d0 Volume group "/dev/vg00" has been successfully extended. Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Create the boot area on the disk, either character device or block device can be used.
# /usr/sbin/mkboot /dev/rdsk/c1t0d0
Run the mkboot again to update the boot string in the AUTO file. The "-lq" allow the disk to boot with quorum, this basically means with being associated with the primary root disk.
# /usr/sbin/mkboot -a "hpux -lq" /dev/rdsk/c1t0d0
Use lvextend to mirror each logical volume on the root disk in the same order as the orginal root disk.
To get the current root disk logical volume order do:# pvdisplay -v /dev/dsk/c1t7d0s2 | grep current | grep 00000
Mirror the logical volume, in the order displayed above. We are only showing the mirroring of on logical volume, perform the same for all the logical volumes or create a for loop in a script.
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0s2 The newly allocated mirrors are now being synchronized. This operation will take some time. Please wait .... Logical volume "/dev/vg00/lvol1" has been successfully extended.
Update the root volume group information, reestablish LVM knowledge of root, boot, swap and dump areas. This can be run individually or as one command:
# lvlnboot -R /dev/vg00 Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
or
# /usr/sbin/lvlnboot -b /dev/vg00/lvol1 # /usr/sbin/lvlnboot -r /dev/vg00/lvol3 # /usr/sbin/lvlnboot -s /dev/vg00/lvol2 # /usr/sbin/lvlnboot -d /dev/vg00/lvol2 # /usr/sbin/lvlnboot -R
Display the boot disk reserved area using lvlnboot.
# lvlnboot -v Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/dsk/c1t7d0s2 (0/4/1/0.7.0) -- Boot Disk /dev/dsk/c1t0d0 (0/4/1/0.0.0) /dev/dsk/c1t0d0s2 (0/4/1/0.0.0) -- Boot Disk Boot: lvol1 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Root: lvol3 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Swap: lvol2 on: /dev/dsk/c1t7d0s2 /dev/dsk/c1t0d0s2 Dump: lvol2 on: /dev/dsk/c1t7d0s2, 0
Set the alternate boot path to the newly mirrored disk
# setboot -a 0/4/1/0.0.0
Finally edit the /stand/bootconf. With a line beginning with a lowercase letter l, meaning logical, LVM or VxVM, for the newly mirrored disk.
# vi /stand/bootconf l /dev/dsk/c1t7d0s2 l /dev/dsk/c1t0d0s2
The mirror disk should be tested on reboot simply boot into the alternate path, then shutdown and reboot again, booting into primary path.
© Lightnetics 2024