Chinaunix首页 | 论坛 | 博客
  • 博客访问: 188058
  • 博文数量: 28
  • 博客积分: 1505
  • 博客等级: 上尉
  • 技术积分: 455
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-22 16:45
文章分类

全部博文(28)

文章存档

2014年(2)

2012年(1)

2011年(1)

2010年(7)

2009年(12)

2008年(5)

我的朋友

分类:

2010-07-08 10:52:27

该实例中,c1t2d0和c2t2d0两个PV互为镜像,如下所示:现在c1t2d0的S/W State为NO_HW,准备更换硬盘。

 

#ioscan -funCdisk

Class     H/W Path     Driver S/W State   H/W Type     Description

=====================================================================

disk      0/0/1/1.2.0  sdisk NO_HW       DEVICE       SEAGATE ST39204LC

                         /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk      0/0/2/0.2.0  sdisk CLAIMED     DEVICE       SEAGATE ST39204LC

                         /dev/dsk/c2t2d0   /dev/rdsk/c2t2d0

disk      0/0/2/1.2.0  sdisk CLAIMED     DEVICE       HP      DVD-ROM 6x/32x

                         /dev/dsk/c3t2d0   /dev/rdsk/c3t2d0

 

先拔掉H/W Path为0/0/1/1.2.0的硬盘,换上新的硬盘,并执行ioscan –fnCdisk,如下所示,c1t2d0的S/W State变为CLAIMED

 

#ioscan -fnCdisk

Class     H/W Path     Driver S/W State   H/W Type     Description

=====================================================================

disk      0/0/1/1.2.0  sdisk CLAIMED     DEVICE       SEAGATE ST39204LC

                         /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

disk      0/0/2/0.2.0  sdisk CLAIMED     DEVICE       SEAGATE ST39204LC

                         /dev/dsk/c2t2d0   /dev/rdsk/c2t2d0

disk      0/0/2/1.2.0  sdisk CLAIMED     DEVICE       HP      DVD-ROM 6x/32x

                         /dev/dsk/c3t2d0   /dev/rdsk/c3t2d0

 

按照下面的步骤执行命令:

 

1、恢复VG信息:

#vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t2d0    

Volume Group configuration has been restored to /dev/rdsk/c1t2d0

 

2、改变VG状态:

#vgchange -a y /dev/vg00

Volume group "/dev/vg00" has been successfully changed.

 

3、mkboot创建引导区信息:

来源:(http://blog.sina.com.cn/s/blog_4a68f770010004x8.html) - 在线更换Mirror盘_flybird0316_新浪博客

#mkboot /dev/rdsk/c1t2d0

#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t2d0

 

4、创建swap和dump区:

#lvlnboot -R

Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

 

5、同步VG:

#vgsync /dev/vg00

Resynchronized logical volume "/dev/vg00/lvol1".

Resynchronized logical volume "/dev/vg00/lvol2".

Resynchronized logical volume "/dev/vg00/lvol3".

Resynchronized logical volume "/dev/vg00/lvol4".

Resynchronized logical volume "/dev/vg00/lvol5".

Resynchronized logical volume "/dev/vg00/lvol6".

Resynchronized logical volume "/dev/vg00/lvol7".

Resynchronized logical volume "/dev/vg00/lvol8".

Resynchronized volume group "/dev/vg00".

 

6、查看boot信息:

#lvlnboot -v

Boot Definitions for Volume Group /dev/vg00:

Physical Volumes belonging in Root Volume Group:

        /dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk

        /dev/dsk/c2t2d0 (0/0/2/0.2.0) -- Boot Disk

Boot: lvol1     on:     /dev/dsk/c1t2d0

                        /dev/dsk/c2t2d0

Root: lvol3     on:     /dev/dsk/c1t2d0

                        /dev/dsk/c2t2d0

Swap: lvol2     on:     /dev/dsk/c1t2d0

                        /dev/dsk/c2t2d0

Dump: lvol2     on:     /dev/dsk/c1t2d0, 0

 

这样就完成了mirror盘的更换和配置。

阅读(1209) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~