- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Boot disk
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
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
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
тАО04-01-2012 01:22 AM
тАО04-01-2012 01:22 AM
How to find out the device file of boot disk from which os got booted in a mirrored root disk environment ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2012 06:00 PM
тАО04-01-2012 06:00 PM
SolutionNo simple answer...it is very different depending on the revision of HP-UX you are using and whether you are running on PARISC or Itanium. Here is a code snippet that runs on all versions of 10.xx through 11.31, PARISC and Itanium (aka, Integrity):
#!/usr/bin/sh set -u MYREV=$(uname -r | cut -f2-3 -d. | tr -d .) 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, it will be 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" | awk '{print $NF}') # for 11.31, minor is for the DSF 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
You can strip out the code that matches your version of HP-UX or use all of it to handle all possible versions of HP-UX starting with 10.xx
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2012 01:39 AM
тАО04-02-2012 01:39 AM
Re: Boot disk
Thank you Bill for that script
On PARISC servers
echo "boot_string/S" | adb /stand/vmunix /dev/kmem
(Not tested on all servers. Worked for me most of the times I used it)
On Itanium boxes grep for Boot
grep Boot /var/adm/syslog/syslog.log
Apr 1 09:55:35 ****** vmunix: Boot device's HP-UX HW path is: 0.0.1.0.0.0
This will give you the hardware path of boot disk. You can then find the device file using the ioscan -fnH command. Works on 11.31, not tried on the previous versions.
(The information will be logged when the server starts. So if your server is configured to trim the syslog file on regular basis you may have to search for entries corresponding to your last reboot time in your archived syslog files)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2012 08:11 AM
тАО05-26-2012 08:11 AM
Re: Boot disk
Still i didn't get any correct answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2012 02:10 PM
тАО05-26-2012 02:10 PM
Re: Boot disk
>> Still i didn't get any correct answer.
This isn't helpful at all. What did you try? Did you use grep to look at syslog.log, or did you use my script? If you did either of those ideas, what was the result? Did you have problems running the script above? Did your computer crash? Was there any error message when you tried the steps above?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2012 09:02 PM
тАО05-29-2012 09:02 PM
Re: Boot disk
Hi Bill,
When i run using your script am getting the following error on 9000/800/rp7420 model server (os 11.31)
Last booted using adb: warning: Object file and memory file versions do not match ...
adb: warning: Symbol lookups may fail.
0x1 (disk10 or c2t0d0
-------------------------------------------------------------------------
but the scripts is working fine on 9000/800/rp4440,ia64 hp superdome server SD32B,(os 11.31)
-----------------------------------------------------------------
grep Boot /var/adm/syslog/syslog.log -> it is not working out any of my server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2012 12:39 AM
тАО05-30-2012 12:39 AM
Re: Boot disk
>getting the following error on 9000/800/rp7420 model server (OS 11.31)
What does this return? The same warning messages?
echo "bootdev/x" | adb -n /stand/vmunix /dev/kmem
Is /stand/vmunix the kernel you booted with?