When root disk is mirrored at OS level, its difficult to know which disk system is booted from. Learn here how to identify current boot disk in HPUX.
There are a couple of ways by which you can identify boot disk from which the HPUX system is currently booted. This information is handy when HPUX is having root mirroring and if any maintenance activity needs to be carried out.
In such scenarios, one must know the current boot disk out of 2 root mirror disks. For example, if you have a root disk failure in the mirror then you must know if boot disk is damaged or not so that you can safely redirect IO to another disk/plan your maintenance.
Method 1
An easy method is to use setboot
command which clearly states the primary boot disk.
# /usr/sbin/setboot -v
Primary bootpath : 2/0/0/3/0.0x6.0x0 (/dev/rdisk/disk40)
HA Alternate bootpath :
Alternate bootpath : 2/0/0/2/0.0x6.0x0 (/dev/rdisk/disk16)
Autoboot is ON (enabled)
Hyperthreading : OFF
: OFF (next boot)
----- output truncated -----
Method 2
This is a bit tricky. You need to use adb
to get the hardware address of the booted disk. Then this hardware address can be traced back to disk name by matching in under ioscan
output.
# echo "boot_string/S" | adb /stand/vmunix /dev/kmem
boot_string:
boot_string: (12/0/9/1/0.0.0;)/stand/vmunix
Method 3
Even by observing Syslog messages after boot, one can determine from which disk kernel was booted.
# grep "Boot device" /var/adm/syslog/syslog.log
Nov 15 18:44:18 myserver1 vmunix: Boot device's HP-UX HW path is: 2/0/0/3/0.0x6.0x0
.0
In the above output, it clearly mentions the hardware path of the disk from which the kernel was booted. Now, this hardware path can be matched with the device name in ioscan -fnCdisk
output and a disk name can be obtained.
Share Your Comments & Feedback: