1833845 Members
2104 Online
110063 Solutions
New Discussion

_hp_root_disk

 
SOLVED
Go to solution
Jun Zhang_4
Regular Advisor

_hp_root_disk

As I understand, this is equivalent to disk[0], and the second disk will be disk[1] and so on.
What is the selection rule ? Is it according to scsi-id/controller or the hardware path?
Looking at the different size of disks on one machine of mine, I would like to know some ways to have controls on it.

Jun Z
Food lover
15 REPLIES 15
Sridhar Bhaskarla
Honored Contributor

Re: _hp_root_disk

Hi,

I couldn't quite well get the context of your question. If you are referring to lvm order it's the way the disks are added into /etc/lvmtab. Then the boot path determines who disk to boot from.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
G. Vrijhoeven
Honored Contributor

Re: _hp_root_disk

HI Jun Z,

It is the hardware path ( this includes the SCSI id at the end), you can alter this info with ioinit ( man ioinit ). But this info normally is stable.

Gideon
A. Clay Stephenson
Acclaimed Contributor

Re: _hp_root_disk

HP-UX doesn't work like that. The primary and alternate boot devices are stored in protected/stable memory on the systemboard.
These can be set to any valid boot device regardless of the controller slot or SCSI ID.

HP does not follow the stupid PC convention of looking for SCSI ID 0 -- which was a bad choice because under SE-SCSI, 0 was the lowest priority device. The smart play would have been to look for 6 -- the highest after the controller itself (7).
If it ain't broke, I can fix that.
Jun Zhang_4
Regular Advisor

Re: _hp_root_disk

Can one change this protected/stable memory settings on the system board?
I have an E35 with 5 disks on the same controller, and 56/52.0.0 is being used as the root disk, so I'am not sure if the pick is from high to low or vice versa (scsi id).
This has nothing to do with lvm.


Jun Z
Food lover
A. Clay Stephenson
Acclaimed Contributor

Re: _hp_root_disk

This has nothing to do with LVM and again there is no hard-set rule. You can use the setboot command to set the primary and alternate boot paths to whatever physical device you like. Man setboot for details. You can also interrupt the boot process and set the paths under the firmware monitor. Note that using either method, it is possible to create an unbootable machine; although, assuming that you do have a valid bootable disk, you can correct your mistakes using the firmware monitor.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: _hp_root_disk

The root disk is typically the disk that your machine boots from. So whatever your primary boot disk is will be your root disk. You could change this, but it is very possible that you would render your system unbootable.

What exactly are you trying to accomplish?
Jun Zhang_4
Regular Advisor

Re: _hp_root_disk

I want to know the mapping rule of _hp_root_disk to the actual disk, when ivoked from within an Ignite config file, and the possibility to change the rule.
My apology if I didn't express it clearly.

Jun Z
Food lover
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: _hp_root_disk

By default, Ignite puts everything back as it was but you can easily enter an interactive session in which you are allowed to change disks, file systems, hostname, tiimezone, etc.

If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: _hp_root_disk

Hi Jun Z,

I looked at save_config script that makes the config files *if* this is what you are referring to.

Here is where the root disk is initialized. I am pasting only the lines that are appropriate.

root_disk=$(grep "^Root:" $lvlnboot_temp_file | awk ' { print $4 } '

This is part of find_root_disk function. Then it gets the hardware path of this disk by calling another function disk_to_path. Then it assigns it to _hp_root_disk

print -u4 "init _hp_root_disk=\"$root_hardware_path\""

So, it's nothing but from the output of lvnlboot which is decided by the order in which the PV appears in /etc/lvmtab

Similar procedure is there if the root disk is part of vxvm.

-Sri





You may be disappointed if you fail, but you are doomed if you don't try
Jun Zhang_4
Regular Advisor

Re: _hp_root_disk

Thank you for digging so deeply, Sridhar. Can I further ask, what would happen if I choose "Whole disk (not LVM) with HFS" as the disk layout, instead of the LVM?
Sorry at this point I didn't do any research but shoot my question once it came upon me.

Jun Z
Food lover
Sridhar Bhaskarla
Honored Contributor

Re: _hp_root_disk

Well - I haven't tried it so far. But I would guess it is going to create a big HFS wholedisk filesystem on the disk you choose, mounts it as / and then extracts the data under it. So, you will find /usr, /var, /opt, /tmp etc., as subdirectories under it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jun Zhang_4
Regular Advisor

Re: _hp_root_disk

Sorry I mean would it still rely on the output from lvlnboot to assign _hp_root_disk a value?

Jun
Food lover
Sridhar Bhaskarla
Honored Contributor

Re: _hp_root_disk

Hi (again),

When you create a recovery archive using make_net_recovery or make_tape_recovery, a config file will be created using save_config command and the path to the root disk (as determined in my previous posts). When you restore the system using this image and if you do not interact (or take the defaults) OS will be recovered exactly on the same disk like it was before.

You can change the configuration by interacting with it. Like creating the whole disk configuration or changing the hardware path.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jun Zhang_4
Regular Advisor

Re: _hp_root_disk

I realized that A Clay is right: There is always a primary boot path, which is assigned to _hp_root_disk, and one can use setboot to change it.

Jun Z
Food lover
Sridhar Bhaskarla
Honored Contributor

Re: _hp_root_disk

As per the script, the output of lvlnboot -v determines the _hp_root_disk *if* you are using save_config to generate the configuration file and if you are talking about that configuration file for use with recovery.

You can reboot the system with the alternate path and see if _hp_root_disk gets changed after running save_config. It should if the output of lvlnboot gets changed.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try