Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (10) AWS (5) numerology (5)

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**


No comments:

Post a Comment