免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2127 | 回复: 5
打印 上一主题 下一主题

配置mirror for HP-UX [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-30 10:08 |只看该作者 |倒序浏览
A.镜像前的情况:
     .先确定如下情况:
       主磁盘是:     /dev/dsk/c2t1d0
       镜像的磁盘是: /dev/dsk/c3t0d0
            (用命令“ ioscan –fnC disk”可以查看)
       确定系统是否安装MirrorDisk/UX:用“swlist”查看

           
#
# uname -a
HP-UX grainte B.11.11 U 9000/800 283889281 unlimited-user license


# ioscan -fnC disk
Class     I  H/W Path       Driver  S/W State   H/W Type     Description
=========================================================================
disk      0  0/0/3/0.0.0.0  sdisk   CLAIMED     DEVICE       TEAC    DV-28E-C
                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/1/1/0.1.0    sdisk   CLAIMED     DEVICE       HP 146 GST3146807LC
                           /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0
disk      2  0/1/1/1.0.0    sdisk   CLAIMED     DEVICE       HP 146 GST3146807LC
                           /dev/dsk/c3t0d0   /dev/rdsk/c3t0d0
#
.使用参数“-B”创建一个用于镜像的可引导的LVM磁盘:
#  pvcreate  -f  -B  /dev/rdsk/c3t0d0
Physical volume "/dev/rdsk/c3t0d0" has been successfully created.

将上一步LVM磁盘添加到根卷组中:
# vgextend   /dev/vg00  /dev/dsk/c3t0d0
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

.将新磁盘制作成引导磁盘,需要注意的是要使用字符设备:
# mkboot  /dev/rdsk/c3t0d0

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3     229376   85056  143232   37% /
/dev/vg00/lvol1     314736   60928  222328   22% /stand
/dev/vg00/lvol8    8388608  433896 7892784    5% /var
/dev/vg00/lvol7    4194304 1221328 2949784   29% /usr
/dev/vg00/lvol9    20971520  478296 20173068    2% /users
/dev/vg00/lvol4    2097152  159736 1922904    8% /tmp
/dev/vg00/lvol10   20971520 9226748 11561404   44% /oracle
/dev/vg00/lvol6    4194304 1689416 2485344   40% /opt
/dev/vg00/lvol5    2097152    2720 2078128    0% /home

将镜像到可引导的磁盘。要确保vg00中的所有设备均已镜像,
要确保lv0l1是镜像的第一逻辑卷。若lvol1不是第一逻辑卷,系统就不能镜像启动。

#  lvextend  -m  1  /dev/vg00/lvol1 /dev/dsk/c3t0d0
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 /dev/dsk/c3t0d0
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
#  lvextend  -m  1  /dev/vg00/lvol3 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol4 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol4" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol5 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol5" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol6 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol6" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol7 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol7" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol8 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol8" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol9 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol9" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
#  lvextend  -m  1  /dev/vg00/lvol10 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol10" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

.拷贝正确的AUTO文件到新的LIF区,注意使用字符设备:
mkboot -a 'hpux -lq(;0) /stand/vmunix' /dev/rdsk/c3t0d0

.指定引导逻辑卷、根逻辑卷、主交换逻辑卷(用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

.恢复所有的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/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk
        /dev/dsk/c3t0d0 (0/1/1/1.0.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t1d0
                        /dev/dsk/c3t0d0
Root: lvol3     on:     /dev/dsk/c2t1d0
                        /dev/dsk/c3t0d0
Swap: lvol2     on:     /dev/dsk/c2t1d0
                        /dev/dsk/c3t0d0
Dump: lvol2     on:     /dev/dsk/c2t1d0, 0

  .显示当前的主引导路径和替代引导路径:

# setboot
Primary bootpath : 0/1/1/0.1.0
Alternate bootpath : 0/1/1/1.0.0 #这个地方的路径一定要与/dev/dsk/c3t0d0 (0/1/1/1.0.0) -- Boot Disk的一样。否则用下面命令更改

strings /etc/lvmtab

setboot -a 0/1/1/1.0.0
然后重启服务器,在控制台上用选择第二块硬盘重启:
bo alt
n


Autoboot is ON (enabled)
Autosearch is ON (enabled)


#



node1#[/]strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/vglock
/dev/dsk/c4t0d2
/dev/dsk/c6t0d2
/dev/dsk/c8t0d2
/dev/dsk/c10t0d2
/dev/vgusers
/dev/dsk/c4t0d1
/dev/dsk/c4t0d3
/dev/dsk/c6t0d1
/dev/dsk/c8t0d1
/dev/dsk/c10t0d1
/dev/dsk/c6t0d3
/dev/dsk/c8t0d3
/dev/dsk/c10t0d3
new

论坛徽章:
0
2 [报告]
发表于 2006-04-30 10:13 |只看该作者
这个镜像好象有问题的

论坛徽章:
0
3 [报告]
发表于 2006-04-30 10:16 |只看该作者
这样重起机器从镜像盘是启动不起来的

论坛徽章:
0
4 [报告]
发表于 2006-04-30 10:18 |只看该作者
mkboot  /dev/rdsk/c3t0d0要加上-l参数要为新盘写入LIF区

论坛徽章:
0
5 [报告]
发表于 2006-04-30 10:44 |只看该作者
还要做一步mkboot -a "hpux -lq(;0) /stand/vmunix"为新的物理盘设置内核引导路径及取消引导仲裁机制

论坛徽章:
0
6 [报告]
发表于 2006-05-03 14:13 |只看该作者
原帖由 fly_sky418 于 2006-4-30 10:44 发表
还要做一步mkboot -a "hpux -lq(;0) /stand/vmunix"为新的物理盘设置内核引导路径及取消引导仲裁机制



good,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP