免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: jijianjun
打印 上一主题 下一主题

真诚请教:有关Mirror Disk的镜像操作。 [复制链接]

论坛徽章:
0
31 [报告]
发表于 2003-09-05 14:23 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

特地找了一下HP的知识库,大家不妨参考一下:
(BTW,这里有谁上过LVM课程的,里面有很详细的解释)
----------------------------------------------------------------------
CHAPTER 4 :     Replacing a boot disk WITH mirroring
----------------------------------------------------------------------

As with chapter 2, mirroring adds a new twist to the recovery of a boot
disk, and makes the recovery much simpler than without mirroring.

Example configuration:

  Volume group /dev/vg00 contains the three disks, with the logical
  volume configuration as shown:


                          |---------|     |---------|     |---------|
                          | lvol 1  |     | lvol 1  |     | lvol 4  |
                          |         |     | mirror  |     |         |
                          |---------|     |---------|     |---------|
                          | lvol 2  |     | lvol 2  |     | lvol 5  |
                          |         |     | mirror  |     |         |
                          |---------|     |---------|     |         |
                          | lvol 3  |     | lvol 3  |     |         |
                          |         |     | mirror  |     |         |
                          |---------|     |---------|     |---------|

  hardware address          52.6.0          52.5.0          52.4.0
  device file (/dev/dsk/)   c0t6d0          c0t5d0          c0t4d0

This scenario involves a head crash of the disk at hardware address
52.6.0.

[Step 4.1]

Shutdown the system, have the customer engineer replace the faulty
disk, and then boot the system in single-user mode from the alternate
boot disk.  If you only have two disks in the root volume group, then
you will need to override quorum as you boot.  Note that you don't have
to boot in single-user mode if all of the disk data is mirrored
elsewhere (but you may still have to override quorum).

Note: If the disk being replaced is Hot-Pluggable (or Hot-Swappable) a
reboot may not be necessary.  Please inquire your customer engineer to
determine if a reboot is required.  If a reboot is not required replace the
disk and go on to step 4.2.

For our example:

  ISL>; hpux -is (52.5.0;0)/stand/vmunix

OR

  ISL>; hpux -is -lq (52.5.0;0)/stand/vmunix
  (if you need to override quorum.)

[Step 4.2]

Restore the LVM configuration/headers onto the replaced disk from
your backup of the LVM configuration, activate the volume group
with the knowledge of the replaced disk, use mkboot to add boot
information, and syncronize the BDRA with these commands:

    # vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t6d0
    # vgchange -a y /dev/vg00
    # mount /usr
    # mkboot /dev/rdsk/c0t6d0
    # mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t6d0
    # lvlnboot -R

Note: If /usr doesn't reside in /dev/vg00 the volume group that does
contain /usr's logical volume will also have to be activated.

At this point it is a good idea to verify that the BDRA information is
accurate.  This can be done with the lvlnboot comman using the -v
option.  Here is an example of the output:

    # lvlnboot -v
    Boot Definitions for Volume Group /dev/vg00:
    Physical Volumes belonging in Root Volume Group:
            /dev/dsk/c0t6d0 (52.6.0) -- Boot Disk
            /dev/dsk/c0t5d0 (52.5.0) -- Boot Disk
            /dev/dsk/c0t4d0 (52.4.0)
    Boot: lvol1     on:     /dev/dsk/c0t6d0
                            /dev/dsk/c0t5d0
    Root: lvol3     on:     /dev/dsk/c0t6d0
                            /dev/dsk/c0t5d0
    Swap: lvol2     on:     /dev/dsk/c0t6d0
                            /dev/dsk/c0t5d0
    Dump: lvol2     on:     /dev/dsk/c0t6d0, 0


Note: You must have performed the command vgcfgbackup to save off
      the headers prior to the disk failure (refer to Appendix A.).

[Step 4.3]

Now, synchronize mirrored logical volumes:

  # vgsync /dev/vg00

[Step 4.4]

If you have any logical volumes that resided on the faulty disk that
were not mirrored, you will need to recreate them as per steps 1.4
and 1.5 from chapter 1.

[Step 4.5]

The final step in the recovery process is to reboot the system.  When
the system restarts, the recovery process will be complete.

  # cd /
  # shutdown -r


At this stage, your system should be fully recovered.  It is a good idea to
verify the system can be booted from the newly replaced drive.

By hpux:热插拔硬盘不用象文章所说启动到单用户LV M模式!

论坛徽章:
0
32 [报告]
发表于 2003-09-05 15:12 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

我刚试了一把,我的是热茶把硬盘,呵呵!
步骤如下:
1.更换硬盘。
2#.vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtYdZ(恢复VGDA和PVRA)
3.#vgchange -a y /dev/vg00(强制验证硬盘)
4# mkboot /dev/rdsk/c0t6d0 (创建BDRA)
5# mkboot -a "hpux -lq" /dev/rdsk/c0t6d0(在LIF区建启动字符串)
6# lvlnboot -Rv(恢复并显示BDRA信息)
7#vgsync /dev/vg00(同步卷组)
8#lvdisplay -v /dev/vg00/lvol*|grep -i "lv status" (验证同步完成)
9#setboot (验证硬盘启动顺序)
10#lifcp /dev/dsk/cXtYdZ:AUTO -  验证lif区信息是否正确

论坛徽章:
0
33 [报告]
发表于 2003-09-05 15:59 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

呵呵,谢谢各位老大的热心帮助,我近期就按各位的方法去实际做一下,然后把实际操作过程和结果贴出来。

论坛徽章:
0
34 [报告]
发表于 2003-09-05 17:53 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

HP-UX版日益壮大耶!祝贺~~~

论坛徽章:
0
35 [报告]
发表于 2003-09-08 14:38 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

哦..............

论坛徽章:
0
36 [报告]
发表于 2003-09-08 18:41 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

论坛徽章:
0
37 [报告]
发表于 2003-09-11 14:19 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

不知道jijianjun最后实际做的结果如何,期待中!

论坛徽章:
0
38 [报告]
发表于 2003-09-13 10:50 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

进hpux -lm
VG00 就是的  deactive

论坛徽章:
0
39 [报告]
发表于 2003-09-14 22:03 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

在HP文档上分几种情况,主机是否重启过?vgcfgbackup文件是否完好?vg00是否跨盘?组合起来就有不同的步骤。

论坛徽章:
0
40 [报告]
发表于 2003-09-17 08:55 |只看该作者

真诚请教:有关Mirror Disk的镜像操作。

让各位久等了,我是9月14日进行实际操作,成功!下面是实际得作业过程。
1、停止数据库应用服务。
2、备份相关数据。
3、更换故障硬盘。(必须是热插拔的硬盘)
4、#ioscan -fnCdisk (识别新的硬盘)
5、#vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t2d0
6、#mkboot /dev/rdsk/c2t2d0
   #mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c2t2d0
7、#lvlnboot –b /dev/vg00/lvol1                        //boot lvol1
   #lvlnboot –r /dev/vg00/lvol3                        //root lvol3
   #lvlnboot –s /dev/vg00/lvol2                        //swap lvol2
   #lvlnboot –d /dev/vg00/lvol2                        //dump lvol2
   #lvlnboot –R
   #lvlnboot –v                                        //view
8、#setboot   (确认boot信息)
9、#sync  (做同步)
10、#reboot (重新启动服务器,确认能正常启动)
11、启动数据库应用服务,测试正常。


经测试,得出以下结论:
1、在线更换硬盘,不需要做pvcreate.
2、如果离线更换硬盘,关机前要vgreduce这块盘,不然重新启动服务器后无法pvcreate。
3、如果关机前没有vgreduce这块盘,关机后重新启动服务器,做pvcreate时,此时必须更改/etc/lmvtab文件名,不然系统提示已经存在。

感谢各位得帮助!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP