HP-UX - Configure LVM including MirrorDisk UX
发表于 : 2013年 8月 2日 22:59 星期五
1. Make sure the add-on product HP MirrorDisk/UX (B2491BA) is installed.
2. Identify a free local disk to be partitioned.
NOTE: For these instructions, we will use /dev/disk/disk6 as the mirror disk and /dev/disk/disk5 as the primary boot disk.
3. Determine the size of the EFI & HPSP partitions on the primary (vg00) boot disk:
NOTE: In this example disk5 is the primary boot disk. Output from the following commands is in MBs:
4. Create a partition description file.
Add these entries to this file, replacing the 500MB and 400MB with the sizes from the commands above:
NOTE: You can verify the partitioning using idisk:
6. Use ioscan to determine the hardware path to the mirror disk.
7. Use insf to create device files for the newly created partitions.
For example:
insf –e -H 64000/0xfa00/0x2
8. Initialize the EFI and HPSP partitions on the mirror disk.
9. Use pvcreate to make the HPUX partition an LVM managed disk
10. Use vgextend to add the disk to vg00
11. Use mkboot to place the necessary boot files on the disk
NOTE: no partition on the end.
12. Use efi_cp to copy the autoboot file from the original boot disk to a local file.
NOTE: Remember the EFI partition is the device file with the suffix p1.
13. Edit the auto file to ensure it includes the “-lq” option on the end of the boot string
NOTE: This will ensure the system will boot on either the primary or mirror boot disks in the event one or the other fails (lack of quorum).
14. Use efi_cp to copy the ./myautoboot file into the new disk’s EFI partition
NOTE: If you had to add the “-lq” option in the previous step then you need to copy the myautoboot file back to the primary boot disk as well to ensure it will boot in the event the mirror fails.
15. Use pvdisplay to identify the order of the logical volumes on the primary disk.
NOTE: This is very important.
Output should include something like this:
16. Use lvextend to create mirror copies of the identified logical volumes in the correct sequence
17. Use pvdisplay to verify the correct sequence of the logical volumes on the mirror disk
18. Use lvlnboot to update all physical volumes in the root volume group (vg00) with root, boot, primary swap & dump logical volumes
Verify the BDRA with:
19. Add a line to /stand/bootconf for the new boot disk
Then append (the ‘l’ denotes LVM):
20. Use setboot to add the EFI primary and HA (high availablility) boot paths (use correct hardware paths).
(Set primary boot disk)
(Set mirror boot disk)
(Set autoboot on)
Verify the primary and mirrors are configured properly by executing setboot with no options.
21. Test the mirror by rebooting the system using the mirror disk.
When the system is booting up select “HP-UX HA Alternate Boot" as your boot device to test the mirror.
At this point you may discover there is no “HP-UX HA Alternate Boot” entry in the EFI Boot Manager Menu. If not, follow this procedure:
a. At the EFI Boot Manager Menu select the EFI shell menu option.
b. Access the EFI System Partition for the alternate boot device from which you want to boot HP-UX (fsX: where X is the file system number) . To get a list of these file systems type “map” then press enter.
c. As an example we will use “fs1:”.
d. Your prompt will now read “fs1:\>”.
e. Enter “dir efi\hpux”. You should see a file named “HPUX.EFI”.
f. To boot enter ″efi\hpux\hpux.efi″.
g. At this point you may get a “HPUX>” prompt.
h. To boot enter “boot vmunix –lq”
i. After the system is up verify the kernel and disk you booted from:
grep "Boot device" /var/adm/syslog/syslog.log
22. If primary swap is mirrored and is also serving as a dump area, you must make sure that Mirror Write Cache and Mirror Consistency Recovery is disabled at boot time to avoid loss of your dump.
a. To change these options you will need to reboot your system into maintenance mode by interrupting the boot process and boot using “hpux –lm”.
b. Once up in maintenance mode then activate the root volume group (vg00) by executing “vgchange –a y vg00”
c. Then execute “lvchange –M n –c n /dev/vg00/lvol2”.
d. Reboot the system.
23. Install the offline diagnostics to the mirror disk (optional):
Copy the contents of the HPSP on the primary boot disk to the mirror boot disk:
NOTE: The HPSP will not be populated during a cold install. This must be accomplished manually by booting the offline diagnostics CD and run the CD installer to install/update the contents of the HPSP. Once this is done you can use the above “dd” command to populate the mirror disk HPSP partition.
代码: 全选
swlist –l fileset | grep –i mirror
NOTE: For these instructions, we will use /dev/disk/disk6 as the mirror disk and /dev/disk/disk5 as the primary boot disk.
3. Determine the size of the EFI & HPSP partitions on the primary (vg00) boot disk:
NOTE: In this example disk5 is the primary boot disk. Output from the following commands is in MBs:
代码: 全选
diskinfo -b /dev/rdisk/disk5_p1 | awk '{print $1 / (1024)}'
代码: 全选
diskinfo -b /dev/rdisk/disk5_p3 | awk '{print $1 / (1024)}'
代码: 全选
vi /tmp/part_df
5. Partition the disk using idisk and the partition description file.3
EFI 500MB
HPUX 100%
HPSP 400MB
代码: 全选
idisk –wf /tmp/part_df /dev/rdisk/disk6
代码: 全选
idisk /dev/rdisk/disk6
代码: 全选
ioscan –fNnkC disk
代码: 全选
insf –e –H <h/w address>
insf –e -H 64000/0xfa00/0x2
8. Initialize the EFI and HPSP partitions on the mirror disk.
代码: 全选
efi_fsinit –d /dev/rdisk/disk6_p1
代码: 全选
efi_fsinit –d /dev/rdisk/disk6_p3
代码: 全选
pvcreate –fB /dev/rdisk/disk6_p2
代码: 全选
vgextend vg00 /dev/disk/disk6_p2
代码: 全选
mkboot –e –l /dev/rdisk/disk6
12. Use efi_cp to copy the autoboot file from the original boot disk to a local file.
NOTE: Remember the EFI partition is the device file with the suffix p1.
代码: 全选
efi_cp –d /dev/rdisk/disk5_p1 –u /efi/hpux/auto ./myautoboot
代码: 全选
boot vmunix –lq
14. Use efi_cp to copy the ./myautoboot file into the new disk’s EFI partition
代码: 全选
efi_cp –d /dev/rdisk/disk6_p1 ./myautoboot /efi/hpux/auto
代码: 全选
efi_cp –d /dev/rdisk/disk5_p1 ./myautoboot /efi/hpux/auto
15. Use pvdisplay to identify the order of the logical volumes on the primary disk.
NOTE: This is very important.
代码: 全选
pvdisplay –v /dev/disk/disk5_p2 | more
/dev/vg00/lvol1 19 19
/dev/vg00/lvol2 256 256
/dev/vg00/lvol3 35 35
/dev/vg00/lvol4 128 128
/dev/vg00/lvol5 2 2
/dev/vg00/lvol6 293 293
/dev/vg00/lvol7 368 368
/dev/vg00/lvol8 288 288
16. Use lvextend to create mirror copies of the identified logical volumes in the correct sequence
代码: 全选
lvextend –m 1 /dev/vg00/lvol1 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol2 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol3 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol4 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol5 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol6 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol7 /dev/disk/disk6_p2
lvextend –m 1 /dev/vg00/lvol8 /dev/disk/disk6_p2
代码: 全选
pvdisplay –v /dev/disk/disk6_p2 | more
代码: 全选
lvlnboot –R /dev/vg00
代码: 全选
lvlnboot –v
代码: 全选
vi /stand/bootconf
代码: 全选
l /dev/disk/disk6_p2
20. Use setboot to add the EFI primary and HA (high availablility) boot paths (use correct hardware paths).
代码: 全选
setboot –p /dev/rdisk/disk5
代码: 全选
setboot –h /dev/rdisk/disk6
代码: 全选
setboot –b on
Verify the primary and mirrors are configured properly by executing setboot with no options.
21. Test the mirror by rebooting the system using the mirror disk.
代码: 全选
shutdown –ry 0
At this point you may discover there is no “HP-UX HA Alternate Boot” entry in the EFI Boot Manager Menu. If not, follow this procedure:
a. At the EFI Boot Manager Menu select the EFI shell menu option.
b. Access the EFI System Partition for the alternate boot device from which you want to boot HP-UX (fsX: where X is the file system number) . To get a list of these file systems type “map” then press enter.
c. As an example we will use “fs1:”.
d. Your prompt will now read “fs1:\>”.
e. Enter “dir efi\hpux”. You should see a file named “HPUX.EFI”.
f. To boot enter ″efi\hpux\hpux.efi″.
g. At this point you may get a “HPUX>” prompt.
h. To boot enter “boot vmunix –lq”
i. After the system is up verify the kernel and disk you booted from:
grep "Boot device" /var/adm/syslog/syslog.log
22. If primary swap is mirrored and is also serving as a dump area, you must make sure that Mirror Write Cache and Mirror Consistency Recovery is disabled at boot time to avoid loss of your dump.
a. To change these options you will need to reboot your system into maintenance mode by interrupting the boot process and boot using “hpux –lm”.
b. Once up in maintenance mode then activate the root volume group (vg00) by executing “vgchange –a y vg00”
c. Then execute “lvchange –M n –c n /dev/vg00/lvol2”.
d. Reboot the system.
23. Install the offline diagnostics to the mirror disk (optional):
Copy the contents of the HPSP on the primary boot disk to the mirror boot disk:
代码: 全选
dd if=/dev/rdisk/cxtxdxs3 of=/dev/rdisk/disk6_p3 bs=1024k