HP-UX 磁盘镜像的实现
1、查看MirrorDisk/UX 磁盘镜像软件包是否安装
#swlist -l bundle |grep MirrorDisk
2、确认要做镜像的磁盘
#ioscan -fnC disk
/dev/dsk/c1t0d0
3、创建一个可引导的PV
#pvcreate -f -B /dev/rdsk/c0t2d0 //使用参数“-B”创建一个用于镜像的可引导的LVM磁盘
4、将PV 加到要做镜像的PV 中
#vgextend /dev/vg00 /dev/dsk/c0t2d0 //将上一步的LVM磁盘添加到根卷组中
5、制作可引导磁盘
#mkboot /dev/c0t2d0 //将新磁盘制作成为可引导的磁盘
6、磁盘做镜像
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
6、拷贝正确的AUTO文件到新的LIF区
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/dsk/c0t0d0
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/dsk/c0t2d0
7、指定引导逻辑卷、根逻辑卷、主交换逻辑卷(用swapinfo确定交换逻辑卷在什么地方)、
转储逻辑卷,为根和交换镜像拷贝更新包含在BDRA中等启动信息:
# lvlnboot -b /dev/vg00/lvol1 //指定引导逻辑卷(仅适用于 10.20)
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 //指定交换逻辑卷。 使用swapinfo 命令可以确定交换逻辑卷在什么地方。
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
8、恢复所有的BDRA信息
# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
9、确定引导逻辑卷、根逻辑卷、主交换逻辑卷以及转储逻辑卷的设置(检查镜像正确与否)
# 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
10、将引导盘设置为镜像盘(重启检验是镜像是否成功)
# 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 //从镜像盘启动
阅读(2307) | 评论(0) | 转发(0) |