- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to see the disk booted from. or the boot d...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 12:21 PM
05-02-2013 12:21 PM
How to see the disk booted from. or the boot disk is in use currently. ?
EXperts,
How to check which boott disk is system booted from in a mirrored disk environment . in 11.31 hp-ux.
In 11.23 there is a command :
echo "boot_string/S" |adb /stand/vmunix /dev/mem
Is there anything in hp-ux 11.31 to figure this out, which boot_disk system currently booted from & using.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 12:45 PM - edited 05-02-2013 01:02 PM
05-02-2013 12:45 PM - edited 05-02-2013 01:02 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
From syslog:
$ grep -i "boot device" /var/adm/syslog/syslog.log
Feb 8 14:03:15 td193 vmunix: Boot device's HP-UX HW path is: 0.4.1.0.5000c500021780bd.0
$ /usr/sbin/setboot
Primary bootpath : 0/4/1/0.0x5000c500021780bd.0x0 (/dev/rdisk/disk5)
This tells you the boot device used: /dev/rdisk/disk5
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Tags:
- setboot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 01:42 PM
05-02-2013 01:42 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 11:24 PM
05-02-2013 11:24 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Even if you rotate the logs, you still have them, right?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2013 04:31 AM - edited 05-05-2013 05:28 PM
05-03-2013 04:31 AM - edited 05-05-2013 05:28 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
The classic methods are just not reliable...
-- dmesg (limited buffer, boot message rolls off the top)
-- syslog (log truncation may lose the info, syslog.conf may redirect to another file, etc)
-- setboot (shows what is desired but is not a log...the system may have been manually booted)
So the only dependable way is to ask the current kernel. Unfortunately, there have been several changes from the classic methods that worked back in 10.01 through 11.11. Here are the steps (snipped from the attached bootinfo.sh script):
MYREV=$(uname -r | cut -d. -f 2-3 | tr -d .) echo "bootstring using adb:" echo " Last booted using \c" # boot string not available for 11.23 and higher -- returns device minor number only # ie, 0x1f010000 (PARISC) or 0x3000003 (IA) # For 11.31, is the minor # for DSF device -- use ioscan to find CTD if [[ $MYREV -gt 1111 ]] ## new adb for 11.2x and higher then BOOTCODE=$(echo "bootdev/x" | adb -n /stand/vmunix /dev/kmem | tail -1 | tr -d " ") BOOTSTRING=$(echo $BOOTCODE | cut -dx -f2) LEN=${#BOOTSTRING} BOOTMINOR=$(echo "$BOOTSTRING" | cut -c $(($LEN-5))-) DISKDEVS=$(ll /dev/dsk | grep "0x$BOOTMINOR" | grep -v '.pt' | awk '{print $NF}') # for 11.31, minor is for the /dev/disk device file if [ $MYREV -ge 1131 ] then DISKDEVS=$(ll /dev/disk |
grep "0x$BOOTMINOR" |
head -1 |
awk '{print $NF}' |
cut -f1 -d_) DISKCTD=$(ioscan -m dsf /dev/disk/$DISKDEVS |
tail -1 | awk '{print $NF}') DISKDEVS="$DISKDEVS or $(ioscan -m dsf /dev/disk/$DISKDEVS | tail -1 | awk '{print $NF}' | awk -F / '{print $NF}' )" fi echo "$BOOTCODE ($DISKDEVS)" else # tabs supplied by adb echo "boot_string/S" | adb -k /stand/vmunix /dev/kmem | tail -1 | tr -d '[:blank:]' | cut -d: -f2- # drop "boot_string:" fi
The differences are:
-- adb options for 11.23 and higher
-- the bootstring is now an ID with the minor number for the /dev/disk devices
-- the matching minor number may show devname and devname.pt
Here's a sample output from the attached bootinfo script:
# bootinfo bootstring using adb: Last booted using 0x100001c (disk41 or c0t1d0) Boot disks and AUTO file boot command: /dev/disk/disk5_p2 BootCommand: "boot vmunix -lq" /dev/disk/disk41_p2 BootCommand: "boot vmunix -lq" boot PATHS: Primary bootpath = 0/1/1/0.0.0.1.0, /dev/rdsk/c0t1d0 = 0/1/1/0.0x5000c5000abec39d.0x0, /dev/rdisk/disk41 = (disk) 64000/0xfa00/0x13 Alternate bootpath = 0/1/1/0.0.0.2.0, /dev/rdsk/c0t2d0 = 0/1/1/0.0x5000c50007153089.0x0, /dev/rdisk/disk5 = (disk) 64000/0xfa00/0x12 HA Alt bootpath = 0/1/1/0.0.0.1.0, /dev/rdsk/c0t1d0 = 0/1/1/0.0x5000c5000abec39d.0x0, /dev/rdisk/disk41 = (disk) 64000/0xfa00/0x13 Automatic boot settings from setboot: Autoboot is ON (enabled) lvlnboot -v: Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/disk/disk5_p2 -- Boot Disk /dev/disk/disk41_p2 -- Boot Disk Boot: lvol1 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Root: lvol3 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Swap: lvol2 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Dump: lvol2 on: /dev/disk/disk5_p2, 0
This script runs on version 10 and all versions of 11 up to 11.31, PARISC or IA64.
Bill Hassell, sysadmin