HP-UX - Configure LVM including MirrorDisk UX

HP-UX、Linux、Tru64 UNIX、NonStop、OpenVMS、Windows Server等,数据中心、虚拟化方案等

版主: xyevolve

版面规则
1. 本版是定位于惠普软件系统及解决方案的技术讨论区。
2. 本版鼓励发帖共同讨论技术问题,不鼓励站内信件私下交流,独知知不如众知知。
3. 本版允许转贴或引用他人的作品,但必须声明原作者信息。
4. 本版禁止发表出售、求购、或其他非技术讨论等帖子。
5. 本版禁止灌水,包括但不限于任何与所讨论主题无关的回复,无意义字符,直接复制其他回复等。
6. 本站附件禁止用于商业目的,请在下载后24小时内删除,本站不对其造成的结果负任何责任。
回复
admin
网站编辑
帖子: 767
注册时间: 2010年 12月 22日 04:06 星期三

HP-UX - Configure LVM including MirrorDisk UX

帖子 admin » 2013年 8月 2日 22:59 星期五

1. Make sure the add-on product HP MirrorDisk/UX (B2491BA) is installed.

代码: 全选

swlist –l fileset | grep –i mirror
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:

代码: 全选

diskinfo -b /dev/rdisk/disk5_p1 | awk '{print $1 / (1024)}'

代码: 全选

diskinfo -b /dev/rdisk/disk5_p3 | awk '{print $1 / (1024)}'
4. Create a partition description file.

代码: 全选

vi /tmp/part_df
Add these entries to this file, replacing the 500MB and 400MB with the sizes from the commands above:
3
EFI 500MB
HPUX 100%
HPSP 400MB
5. Partition the disk using idisk and the partition description file.

代码: 全选

idisk –wf /tmp/part_df /dev/rdisk/disk6
NOTE: You can verify the partitioning using idisk:

代码: 全选

idisk /dev/rdisk/disk6
6. Use ioscan to determine the hardware path to the mirror disk.

代码: 全选

ioscan –fNnkC disk
7. Use insf to create device files for the newly created partitions.

代码: 全选

insf –e –H <h/w address>
For example:
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
9. Use pvcreate to make the HPUX partition an LVM managed disk

代码: 全选

pvcreate –fB /dev/rdisk/disk6_p2
10. Use vgextend to add the disk to vg00

代码: 全选

vgextend vg00 /dev/disk/disk6_p2
11. Use mkboot to place the necessary boot files on the disk

代码: 全选

mkboot –e –l /dev/rdisk/disk6  
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.

代码: 全选

efi_cp –d /dev/rdisk/disk5_p1 –u /efi/hpux/auto ./myautoboot
13. Edit the auto file to ensure it includes the “-lq” option on the end of the boot string

代码: 全选

boot vmunix –lq
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

代码: 全选

efi_cp –d /dev/rdisk/disk6_p1 ./myautoboot /efi/hpux/auto
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.

代码: 全选

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
Output should include something like this:
/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
17. Use pvdisplay to verify the correct sequence of the logical volumes on the mirror disk

代码: 全选

pvdisplay –v /dev/disk/disk6_p2 | more
18. Use lvlnboot to update all physical volumes in the root volume group (vg00) with root, boot, primary swap & dump logical volumes

代码: 全选

lvlnboot –R /dev/vg00
Verify the BDRA with:

代码: 全选

lvlnboot –v
19. Add a line to /stand/bootconf for the new boot disk

代码: 全选

vi /stand/bootconf
Then append (the ‘l’ denotes LVM):

代码: 全选

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
(Set primary boot disk)

代码: 全选

setboot –h /dev/rdisk/disk6
(Set mirror boot disk)

代码: 全选

setboot –b on 
(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.

代码: 全选

shutdown –ry 0
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:

代码: 全选

dd if=/dev/rdisk/cxtxdxs3 of=/dev/rdisk/disk6_p3 bs=1024k
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.

回复