Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)
Showing posts with label integrity. Show all posts
Showing posts with label integrity. Show all posts

Monday, July 14, 2014

Boot Process in HPUX

Boot Process in HPUX:

Boot process for PA-RISC and Integrity hardware is slightly different, the difference is the boot handler. In Pa-risc we use BCH as boot handler and in Integrity servers EFI.

PA-RISC Boot process
-------------------------

1. Poweron


2. POST/PDC (Processor Dependent Code) /IODC perform hardware self-tests and system initialization i.e it checks for cpu and memory and other peripheral connected to it.


3. BCH (boot console handler)consults NVRAM to identify the default boot device. Checks if AUTOBOOT Flag is on. If yes , its try to locate the Primary boot path.

4. Boot device/disk contains boot area with ISL utility, AUTO file and HPUX utility. isl/hpux use the auto file to choose and boot a kernel.


a. BCH loads Initial system loader , from Primary boot path.
b. ISL Loads the secondery loader called hp-ux.
c. hpux loads the kernel /stand/vmunix


5. vmunix/init complete the boot process.

a. kernel starts first process swapper , and then init
b. Shell /sbin/pre_init_rc executes .
c. init locates /etc/inittab
d. /etc/inittab starts the system the default run level , mentioned with "initdefault" parameter.
e. then executes /sbin/bcheckrc and activates LVM , 

Integrity Boot process :

1. Poweron


2. POST/PAL (Process Abstraction Layer)/SAL perform hardware self-tests and system initialization.


3. EFI (Extensible Firmware Interface) boot manager consults NVRAM to identify the default boot device.  ---> main difference between pa-risc and integrity servers.


4. In boot disk there is a system partition with AUTO file and HPUX kernel loader.


5. hpux.efi uses the auto file to choose and boot a kernel


6. vmunix/init complete the boot process


Additional points :

Auto boot and Auto search:
Ø  If we want our system automatically search for boot sources and boot from prim/HAA or alternate boot path then both option should be on i.e auto search=ON and auto boot=ON
Ø  If we want our system automatically search for boot sources and  list them but do not boot from any of them automatically then auto search flag should be ON and auto boot flag OFF
Ø  If we want our system automatically boot from primary boot source but do not attempt to boot or list other boot sources is primary in unavailable then auto search=OFF and auto boot=ON

Ø  If we want manually supply a bootable device path and interact with BCH  each time our system is turned on then set auto search=OFF and auto boot=OFF


Thanks...
Kirraan Jadhav

Wednesday, June 11, 2014

Root Disk mirroring on Integrity servers (HPUX 11.31)

Root Disk mirroring on Integrity servers (HPUX 11.31)

Please take below few outputs before proceeding:

#lvlnboot –v

# cat /stand/bootconf

#ioscan –m dsf |egrep ‘p1|p2|p3’

1.            Use the following commands to determine the size of the EFI, HP-UX, and HPSP partitions in megabytes on the current boot disk:
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p1 | awk '{print $1 / (1024)}'    
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p2 | awk '{print $1 / (1024)}'
# /usr/sbin/diskinfo -b /dev/rdisk/boot_disk_p3 | awk '{print $1 / (1024)}'


2.            Identify a disk that is not currently in use to be used as the mirror. This EFI partition should be as large as the EFI partition on the current disk. The HP-UX partition should be large enough to hold all the logical volumes in the clone. Although the HPSP partition is optional, if it is created, it should be the same size as the HPSP on the clone.


3.       Create a temporary file, for example /tmp/partitionfile , containing the number of partitions and the size of each partition to be created on the mirror disk. Use the information from steps 1 and 2 to determine partition sizes. Here is a sample command to create the file, indicating three partitions with an EFI partition size of 500 MB, an HPSP partition size of 400 MB, and the remaining space allocated to the HP-UX partition:

# print '3\nEFI 500MB\nHPUX 100%\nHPSP 400MB' > /tmp/partitionfile

See idisk(1M) for more information about partitioning disks.
4.       Use the file created in step 3 to partition the mirror disk with idisk .

(The echo will reply to the confirmation request from the idisk command.)

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/mirror_disk
/tmp/partitionfile may be removed if desired.

# /usr/bin/echo yes | idisk -wf /tmp/partitionfile /dev/rdisk/disk140

Check it by using command:

5.       Use ioscan –fnkC disk to determine the hardware path to the mirror disk.
  1. Use the insf command to create device files for all the newly-created partitions:
# /usr/sbin/insf -e -H hardware_path_to_mirror_disk

7.       Run the pvcreate command on the character device file for the HP-UX (second) partition of the mirror disk using the -B option to make the disk bootable and the -f option to overwrite any pre-existing data on the disk:
# /usr/sbin/pvcreate -f -B /dev/rdisk/mirror_disk_p2

8.       Extend the root volume group to the HP-UX partition of the mirror disk using the block device file of the second (HP-UX) partition in the following command:

# /usr/sbin/vgextend /dev/vg00 /dev/disk/mirror_disk_p2

9.       Run mkboot to complete the setup of the disk as a boot disk. The -e option tells mkboot to use EFI layout, and the -l option tells mkboot that this volume will be used by a volume manager even if it is not currently used by one.


NOTE:
No partition number is given to this command; it looks at the whole disk.
  1. # /usr/sbin/mkboot -e -l /dev/disk/mirror_disk
  1. Create a temporary AUTO file and use the efi_cp command to copy it to the mirror using the block device of the first (EFI) partition. The –lq option ensures that the system will boot without quorum. In the event of the primary boot disk failing, this will allow the mirror disk to boot.
# print 'boot vmunix -lq' > /tmp/AUTO
# /usr/sbin/efi_cp -d /dev/disk/mirror_disks2_p1 /tmp/AUTO /EFI/HPUX/AUTO
Finish with (for either) the following:  # /usr/bin/rm /tmp/AUTO

12.   Starting with the boot, swap, and root logical volumes, run lvextend to mirror each logical volume:

# /usr/sbin/lvextend m 1 /dev/vg00/lvol1 /dev/dsk/mirror_disk_p2
# /usr/sbin/lvextend m 1 /dev/vg00/lvol2 /dev/dsk/mirror_disk_p2 . .  . . .  . . .  . . .  . . .  . . .

Note down all LV name in /tmp/lvanme file.

13.   Run the following lvlnboot commands to re-establish LVM’s knowledge of the root and boot file systems and primary swap and dump.

# /usr/sbin/lvlnboot -b /dev/vg00/lvol1
# /usr/sbin/lvlnboot -r /dev/vg00/lvol3                  
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2                  
# /usr/sbin/lvlnboot -d /dev/vg00/lvol2                    
# /usr/sbin/lvlnboot –R
  1. Add the block device special file of the HP-UX (second) partition of the mirror to the /stand/bootconf file. The lower case l in the following command indicates that the disk is managed by LVM or VxVM.
# /usr/bin/echo "l /dev/disk/mirror_disk_p2" >> /stand/bootconf
  1. If desired, set the alternate boot path to the mirror_disk , using the hardware address determined in step 5. For HP-UX 11iv3, you can just use the block device special file name.
# /usr/sbin/setboot -a mirror_disk
  1. If the mirror disk includes an HPSP partition, use the efi_fsinit command on the character device file for the HPSP (third) partition to initialize it with an EFI file system:
# /usr/sbin/efi_fsinit -d /dev/rdisk/mirror_disk_p3


Thanks...
Kalyanjit

**Let's Share our knowledge**