Operating System - HP-UX
1833883 Members
1856 Online
110063 Solutions
New Discussion

Re: How to know from which harddisk machine boots in LVM

 
SOLVED
Go to solution
Guna_2
Regular Advisor

How to know from which harddisk machine boots in LVM

Hi

I am having 2 36GB harddisks with LVM mirroring in my HP Box. From this 2 harddisk how can i find out at present from which harddisk machine has booted.


If any one knows pls tell me.

Regards
Guna
13 REPLIES 13
nishith
Frequent Advisor

Re: How to know from which harddisk machine boots in LVM

hii guna!!

below command gives the disk from which HP-UX machine booted.

#echo boot_string/S | adb /stand/vmunix /stand/kmem

regds,
nishith.
Indrajit Bhagat
Regular Advisor

Re: How to know from which harddisk machine boots in LVM

please use the command #lvlnboot -v
Torsten.
Acclaimed Contributor

Re: How to know from which harddisk machine boots in LVM

Hi,

you will find this information in the syslog too (boot disk ...).

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!   
Sp4admin
Trusted Contributor

Re: How to know from which harddisk machine boots in LVM

Hello,

you can use the lvlnboot -v command. or if you have just rebooted and not sure just check dmesg.

sp,
Mridul Shrivastava
Honored Contributor
Solution

Re: How to know from which harddisk machine boots in LVM

Execute the following command to determine the boot device :

# echo "bootdev/X" | adb /stand/vmunix /dev/kmem

this will give an output similar to :

bootdev:
bootdev: 1F005000

This number represents the boot device. Here's how to decode it :

1F 00 5 0 00
__ __ _ _ __
| | | | |
major# | target | flags
| |
bus# lun

Per this information:

major# (1F) is 31 in decimal, and major number 31 should be sdisk on your
system (you can use lsdev to verify this).

bus# (00) is the card instance number to which the device is attached.

target (5) is the device's scsi id.

lun (0) is the device's logical unit number.


Therefore, this device maps to /dev/dsk/c0t5d0.

Time has a wonderful way of weeding out the trivial
Raj D.
Honored Contributor

Re: How to know from which harddisk machine boots in LVM

Guna ,

Here is a easy one,

# echo boot_string/S|adb /stand/vmunix /dev/mem

for 11vi

For 11iv2 the command is slightly different. check the man adb for 11.23


hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Arun michael
New Member

Re: How to know from which harddisk machine boots in LVM

Dear Guna;
Use the simple command lvlnboot -v which will solve your doubt
Doru Iulian Barit
Occasional Advisor

Re: How to know from which harddisk machine boots in LVM

Hi.
Try setboot command.
Guna_2
Regular Advisor

Re: How to know from which harddisk machine boots in LVM

Thanks @ all

1) The lvlnboot -v shows both the harddisk. From that how will we fild out the boot harddisk in a mirroring setup


2) echo bootstring/S | adb /stand/vmunix /dev/mem is showing exactly the detail of currently bootd harddisk hw path

3) setboot shows only the primary and alternate path only . If the machine booted on alternate path how will we comes to know that.


4) And /stand/bootconf file shows the presently booted harddisk hw path.

Once again Thanks to all of You

Regards,
Guna
Guna_2
Regular Advisor

Re: How to know from which harddisk machine boots in LVM

Hi


In syslog i am not finding any entry as bootstring or bootdisk


IS there any other option

Regards,
Guna
Kasper Hedensted
Trusted Contributor

Re: How to know from which harddisk machine boots in LVM

Hi Guna,

"lvlnboot -v" displayes both disks, but it will display the text "Boot Disk" next to the one that the system was booted from.

you could use:

lvlnboot -v |grep "Boot Disk"
Guna_2
Regular Advisor

Re: How to know from which harddisk machine boots in LVM

Hi Kasper Hedensted

lvlnboot -v shows the both harddisk as boot disk. Because the hp box have root mirror. So in this case how can we find out from which harddisk the kernel has loaded.

Thanks and Regards,
Guna
Ivan Krastev
Honored Contributor

Re: How to know from which harddisk machine boots in LVM

Check syslog :
# grep "Boot device" /var/adm/syslog/syslog.log

regards,
ivan