在HP 9000系列服务器上镜像启动盘(11iv3)

Mirroring the Boot Disk on HP 9000 Servers:
前提条件:
确保安装mirrordisk软件(需要codeword):
# swlist -l fileset | grep -i mirror
# LVM-MirrorDisk                        B.11.31        MirrorDisk/UX 
  LVM-MirrorDisk.LVM-MIRROR             B.11.31        HP-UX support for the MirrorDisk/UX

使用下列命令查看本地磁盘及它们的路径
# ioscan -m lun
确定当前启动盘可以查看/stand/bootconf文件
# cat /stand/bootconf
l  /dev/disk/disk10

本文环境:操作系统已经安装在组成vg00卷组的disk10上,要将disk9设置成disk10的镜像盘。

步骤:
1、确保存在disk设备文件:
# insf -e -H 0/1/1/0.0x1.0x0

2、创建物理卷:
# pvcreate -f -B /dev/rdisk/disk9

3、添加该物理卷到已经存在的根卷组vg00
# vgextend /dev/vg00 /dev/disk/disk9

4、将boot utilities放到启动区域:
# mkboot /dev/rdisk/disk9

5、添加自启动文件到启动区域:
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.
# mkboot -a "hpux -lq" /dev/rdisk/disk9

6、The logical volumes on the mirror boot disk must be extended in the same order that they are configured on the original boot disk. Determine the list of logical

volumes in the root volume group and their order.
# pvdisplay -v /dev/disk/disk10 | grep 'current.*0000 $'
   00000 current  /dev/vg00/lvol1         00000
   00112 current  /dev/vg00/lvol2         00000
   00624 current  /dev/vg00/lvol3         00000
   00752 current  /dev/vg00/lvol4         00000
   00880 current  /dev/vg00/lvol5         00000
   01520 current  /dev/vg00/lvol6         00000
   01840 current  /dev/vg00/lvol7         00000
   02480 current  /dev/vg00/lvol8         00000
   03120 current  /dev/vg00/lvol9         00000

7、Mirror each logical volume in vg00 (the root volume group) onto the specified physical volume.
# lvextend -m 1 /dev/vg00/lvol1 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol2 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol3 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol4 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol5 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol6 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol7 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol8 /dev/disk/disk9
# lvextend -m 1 /dev/vg00/lvol9 /dev/disk/disk9
或者可以采用更快的方法: 【Linux公社 】
TIP: To shorten the time required to synchronize the mirror copies, use the lvextend and lvsync command options introduced in the September 2007 release of HP-UX 11i

Version
# lvextend -s -m 1 /dev/vg00/lvol1 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol2 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol3 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol4 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol5 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol6 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol7 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol8 /dev/disk/disk9
# lvextend -s -m 1 /dev/vg00/lvol9 /dev/disk/disk9
# lvsync -T /dev/vg00/lvol*

8、更新根卷组的信息:
# lvlnboot -R /dev/vg00

9. Verify that the mirrored disk is displayed as a boot disk and that the boot, root, and swap logical volumes appear to be on both disks as follows:
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk10 -- Boot Disk
        /dev/disk/disk9 -- Boot Disk
Boot: lvol1     on:     /dev/disk/disk10
                        /dev/disk/disk9
Root: lvol3     on:     /dev/disk/disk10
                        /dev/disk/disk9
Swap: lvol2     on:     /dev/disk/disk10
                        /dev/disk/disk9
Dump: lvol2     on:     /dev/disk/disk10, 0

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/58d86537db599187a28009a5b265ad9b.html