HP-UX下做磁盘镜像

网友投稿 789 2022-09-25

HP-UX下做磁盘镜像

HP-UX下做磁盘镜像

环境:系统现有两块磁盘,一块作为主盘,一块作为镜像盘用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/lvol2The 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/lvol1Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf# lvlnboot -r /dev/vg00/lvol3Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf# lvlnboot -s /dev/vg00/lvol2Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf# lvlnboot -d /dev/vg00/lvol2Volume 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 -vBoot 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 DiskBoot: lvol1     on:     /dev/dsk/c0t0d0                        /dev/dsk/c0t2d0Root: lvol3     on:     /dev/dsk/c0t0d0                        /dev/dsk/c0t2d0Swap: lvol2     on:     /dev/dsk/c0t0d0                        /dev/dsk/c0t2d0Dump: lvol2     on:     /dev/dsk/c0t0d0, 0第9步:将引导盘设置为镜像盘(重启检验是镜像是否成功)# setbootPrimary 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                        //从镜像盘启动

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:其实Unix很简单[转]
下一篇:郎酒酒庄局中局!150亿背后的数字化商业逻辑 !(郎酒战略目标)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~