Chinaunix首页 | 论坛 | 博客
  • 博客访问: 18777
  • 博文数量: 6
  • 博客积分: 45
  • 博客等级: 民兵
  • 技术积分: 40
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-30 16:53
文章分类

全部博文(6)

文章存档

2018年(2)

2016年(2)

2015年(1)

2012年(1)

我的朋友

分类:

2015-09-07 14:01:46

原文地址:hp-ux 11.31根盘制作mirror 作者:shana

hp-ux 11.31 VG00 mirror
1、 查看磁盘设备名、硬件路径、VG00中的当前磁盘;
# vgdisplay -v vg00;
   --- Physical volumes ---
   PV Name                     /dev/disk/disk3_p2
   PV Status                   available               
   Total PE                    4347   
   Free PE                     367    
   Autoswitch                  On       
   Proactive Polling           On   
# ioscan -kfnCdisk
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk      0  4/0/1/1/0.0.0  sdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
                           /dev/dsk/c0t0d0     /dev/dsk/c0t0d0s2   /dev/rdsk/c0t0d0    /dev/rdsk/c0t0d0s2
                           /dev/dsk/c0t0d0s1   /dev/dsk/c0t0d0s3   /dev/rdsk/c0t0d0s1  /dev/rdsk/c0t0d0s3
disk      1  4/0/1/1/1.1.0  sdisk   CLAIMED     DEVICE       Optiarc DVD RW AD-5200A
                           /dev/dsk/c1t1d0   /dev/rdsk/c1t1d0
disk      2  4/0/8/1/0.0.0  sdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
                           /dev/dsk/c2t0d0     /dev/dsk/c2t0d0s2   /dev/rdsk/c2t0d0    /dev/rdsk/c2t0d0s2
                           /dev/dsk/c2t0d0s1   /dev/dsk/c2t0d0s3   /dev/rdsk/c2t0d0s1  /dev/rdsk/c2t0d0s3
# ioscan -kfNCdisk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      3  64000/0xfa00/0x1  esdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
disk      4  64000/0xfa00/0x2  esdisk   CLAIMED     DEVICE       Optiarc DVD RW AD-5200A
disk      5  64000/0xfa00/0x4  esdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
2、 编写磁盘的table文件并导入到mirror盘;
#vi /tmp/mirror/table
3
EFI 500MB
HPUX 100%
HPSP 400MB
# idisk -wf /tmp/mirror/table /dev/rdisk/disk5;
# idisk /dev/rdisk/disk5;--查看是否导入成功;
3、 安装分好区的设备文件;
# insf -eCdisk
4、 将新磁盘制作成引导磁盘,需要注意的是要使用字符设备;
# mkboot -e -l /dev/rdisk/disk5;
# efi_ls -d /dev/rdisk/disk5 /efi/hpux;--查看上条命令是否成功;
5、 修改两块磁盘的引导模式(-lq 不进行quorum 检查。当一个VG 只有少于等于50%的硬盘可以正常访问时,默认情况下就不能被激活。加这个参数以后就可以强行激活,在配置了根盘镜像的情况下经常会用到这个参数);
# mkboot -a "boot vmunix -lq" /dev/rdisk/disk3;
# mkboot -a "boot vmunix -lq" /dev/rdisk/disk5;
# efi_cp -d /dev/rdisk/disk3_p1 -u /efi/hpux/auto /dev/tty;--查看是否修改成功;
# efi_cp -d /dev/rdisk/disk5_p1 -u /efi/hpux/auto /dev/tty;--查看是否修改成功;
6、 将新盘的p2分区格式化成PV;
# pvcreate -fB /dev/rdisk/disk5_p2;
Physical volume "/dev/rdisk/disk5_p2" has been successfully created.
7、 将新盘的p2分区加入到VG00中;
# vgextend vg00 /dev/disk/disk5_p2;
Volume group "vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
8、 镜像VG00中的所有LV;
# for lv in /dev/vg00/lvol*
> do
> lvextend -m 1 $lv /dev/disk/disk5_p2;
> done
9、 恢复所有的BDRA信息;
# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -v;--查看镜像情况;
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk3_p2 -- Boot Disk
        /dev/disk/disk5_p2 -- Boot Disk
Boot: lvol1     on:     /dev/disk/disk3_p2
                        /dev/disk/disk5_p2
Root: lvol3     on:     /dev/disk/disk3_p2
                        /dev/disk/disk5_p2
Swap: lvol2     on:     /dev/disk/disk3_p2
                        /dev/disk/disk5_p2
Dump: lvol2     on:     /dev/disk/disk3_p2, 0
10、 修改引导配置文件;
vi /stand/bootconf
l  /dev/disk/disk3_p2
2  /dev/disk/disk5_p2
11、 设备系统引导的设备及顺序;
# ioscan -fnCdisk
Class     I  H/W Path       Driver S/W State   H/W Type     Description
=======================================================================
disk      0  4/0/1/1/0.0.0  sdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
                           /dev/dsk/c0t0d0     /dev/dsk/c0t0d0s2   /dev/rdsk/c0t0d0    /dev/rdsk/c0t0d0s2
                           /dev/dsk/c0t0d0s1   /dev/dsk/c0t0d0s3   /dev/rdsk/c0t0d0s1  /dev/rdsk/c0t0d0s3
disk      1  4/0/1/1/1.1.0  sdisk   CLAIMED     DEVICE       Optiarc DVD RW AD-5200A
                           /dev/dsk/c1t1d0   /dev/rdsk/c1t1d0
disk      2  4/0/8/1/0.0.0  sdisk   CLAIMED     DEVICE       COMPAQ  BF1468B26B
                           /dev/dsk/c2t0d0     /dev/dsk/c2t0d0s2   /dev/rdsk/c2t0d0    /dev/rdsk/c2t0d0s2
                           /dev/dsk/c2t0d0s1   /dev/dsk/c2t0d0s3   /dev/rdsk/c2t0d0s1  /dev/rdsk/c2t0d0s3
# setboot -p 4/0/8/1/0.0.0
# setboot -h 4/0/1/1/0.0.0
注:-p表示主引导设备;-h表示备用引导设备;
12、 重新启动系统,查看是否从设备的磁盘引导;
# grep “Boot device’s HP-UX HW path” /var/adm/syslog/syslog.log
 
 
阅读(879) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~