环境:系统现有两块磁盘,一块作为主盘,一块作为镜像盘
用ioscan -nfCdisk可以查看到两个磁盘
/dev/dsk/c0t0d0         //此盘为主盘
/dev/dsk/c0t2d0         //此盘将作为镜像盘
用swinstall –l bundle查看系统是否安装MirrorDisk/UX
镜像的步骤:
1、pvcreate  -f  -B  /dev/rdsk/c0t2d0 //使用参数“-B”创建一个用于镜像的可引导的LVM磁盘:
2、vgextend /dev/vg00 /dev/dsk/c0t2d0 //将上一步的LVM磁盘添加到根卷组中
3、mkboot /dev/c0t2d0                 //将新磁盘制作成为可引导的磁盘
4、 lvextend  -m  1  /dev/vg00/lvol1   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol2   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol3   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol4   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol5   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol6   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol7   /dev/dsk/c0t2d0
    lvextend  -m  1  /dev/vg00/lvol8   /dev/dsk/c0t2d0
    //将VG00中的所有设备都镜像到镜像盘,-m 1表示拷贝一份镜像,如果文件系统较大,等待时间可能会长一点,如下:
# lvextend -m 1 /dev/vg00/lvol1            
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol2
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
第5步:拷贝正确的AUTO文件到新的LIF区
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/dsk/c0t0d0
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/dsk/c0t2d0 
第6步:指定引导逻辑卷、根逻辑卷、主交换逻辑卷(用swapinfo确定交换逻辑卷在什么地方)、转储逻辑卷,为根和交换镜像拷贝更新包含在BDRA中等启动信息:
# lvlnboot -b /dev/vg00/lvol1
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -r /dev/vg00/lvol3
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -s /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -d /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
第7步:恢复所有的BDRA信息
# lvlnboot -R 
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
第8步:确定引导逻辑卷、根逻辑卷、主交换逻辑卷以及转储逻辑卷的设置(检查镜像正确与否)
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c0t0d0 (0/0/2/0.0.0) -- Boot Disk
        /dev/dsk/c0t2d0 (0/0/2/0.2.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c0t0d0
                        /dev/dsk/c0t2d0
Root: lvol3     on:     /dev/dsk/c0t0d0
                        /dev/dsk/c0t2d0
Swap: lvol2     on:     /dev/dsk/c0t0d0
                        /dev/dsk/c0t2d0
Dump: lvol2     on:     /dev/dsk/c0t0d0, 0
第9步:将引导盘设置为镜像盘(重启检验是镜像是否成功)
# setboot
Primary bootpath : 0/0/2/0.0.0         //此时c0t2d0为主引导盘
Alternate bootpath : 0/0/2/0.2.0
Autoboot is ON (enabled)
Autosearch is ON (enabled)
# setboot -p 0/0/2/0.2.0 -a 0/0/2/0.0.0   //将c0d0t0设为主引导盘
# shutdown -ry 0                        //从镜像盘启动