免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
0
1 [报告]
发表于 2003-09-04 17:33 |显示全部楼层

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

很久没看到这么精彩的讨论了,虽然很忙,但是忍不住要说说我的意见:
1、恢复镜像盘配置信息最好用vgcfgrestore来做,因为镜像盘FAIL的时候,vgreduce做不出来(我试过lvreduce就已经死进程了);
2、/etc/lvmtab不用做任何备份,即使丢了也可以用vgscan -y“捡”回来(不知道aaron2002老大是和用意?);
3、如果是做boot盘,mkboot和lvlnboot -R这两步一定是要的;
4、2块盘做镜像一般做-lq启动形式,否则重启以后系统不会自动从第二块盘启动,如williamCU老大所说;
5、最好用lvlnboot -v确认Boot,Dump,Root,Swap的信息,如果没有设置好需要重新设置。
支持热插拔的硬盘更换绝对不需要重启即可完成,尽管放心去做!小心别把现有的盘数据做掉就行了!

论坛徽章:
0
2 [报告]
发表于 2003-09-05 10:24 |显示全部楼层

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

原帖由 "aaron2002" 发表:
   
2.如果不将/etc/lvmtab改名的话,pvcreate这一步就做不了.^_^
因为是做启动盘,mkboot,mkboot -a ,lvlnboot -Rv这几步确实一定要.
   
我实际操作过(不过现在不能立即实验了),不用改lvmtab直接pvcreate可以!

论坛徽章:
0
3 [报告]
发表于 2003-09-05 13:19 |显示全部楼层

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

Agree to albert!
是我忘记了,在线换盘根本用不着做pvcreate这步,cgcfgrestore就已经把所有信息恢复了。

论坛徽章:
0
4 [报告]
发表于 2003-09-05 14:11 |显示全部楼层

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

[quote]原帖由 "aaron2002"]由于坏的是根盘,所以我认为一定要做pvcreate -B这一步,我做过实验,不做这一步肯定会出问题...[/quote 发表:
   
很奇怪哦!
我有一台L2000机器,2块热插拔硬盘做MIRRO,主盘坏了,在线换主盘!虽然不是我自己做,但是HP工程师(原来负责Alpha)还没有我熟悉,看他操作的时候就是没做pvcreate -B,他都是按HP Call-center发给他的文档来做。我觉得很奇怪,  后来是因为mkboot (-a)没做,从主盘启动不了。
做了以后,就可以启动了,从头到尾就没有用过pvcreate!
到现在系统重启好几次了,都是从主盘启动,没出现过什么问题!

论坛徽章:
0
5 [报告]
发表于 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
6 [报告]
发表于 2003-09-05 17:53 |显示全部楼层

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

HP-UX版日益壮大耶!祝贺~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP