Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3197917
  • 博文数量: 443
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 5679
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-08 12:30
个人简介

欢迎加入IT云增值在线QQ交流群:342584734

文章分类

全部博文(443)

文章存档

2022年(1)

2021年(1)

2015年(2)

2014年(1)

2013年(1)

2012年(4)

2011年(19)

2010年(32)

2009年(2)

2008年(4)

2007年(31)

2006年(301)

2005年(42)

2004年(2)

分类:

2006-05-01 01:26:59

 主机系统是SUN V440,装了Sun Cluster 3.0和VxVM

 

 

 root@ser2 # vxdisk list

 DEVICE       TYPE      DISK         GROUP        STATUS

 c1t0d0s2     sliced    rootdisk_2   rootdg       online

 c1t1d0s2     sliced    rootmirr_2   rootdg       online

 c1t2d0s2     sliced    c1t2d0       rootdg       online

 c1t3d0s2     sliced    -            -            error

 c2t8d0s2     sliced    -            -            online

 c2t9d0s2     sliced    -            -            online

 c2t10d0s2    sliced    -            -            online

 c2t11d0s2    sliced    -            -            online

 c2t12d0s2    sliced    -            -            online

 c3t8d0s2     sliced    -            -            online

 c3t9d0s2     sliced    -            -            online

 c3t10d0s2    sliced    -            -            online

 c3t11d0s2    sliced    -            -            online

 c3t12d0s2    sliced    -            -            online

 -            -         c1t3d0       rootdg       removed was:c1t3d0s2

 root@ser2 # vxdiskadm

 

 Volume Manager Support Operations

 Menu: VolumeManager/Disk

 

 1      Add or initialize one or more disks

 2      Encapsulate one or more disks

 3      Remove a disk

 4      Remove a disk for replacement

 5      Replace a failed or removed disk

 6      Mirror volumes on a disk

 7      Move volumes from a disk

 8      Enable access to (import) a disk group

 9      Remove access to (deport) a disk group

 10     Enable (online) a disk device

 11     Disable (offline) a disk device

 12     Mark a disk as a spare for a disk group

 13     Turn off the spare flag on a disk

 14     Unrelocate subdisks back to a disk

 15     Exclude a disk from hot-relocation use

 16     Make a disk available for hot-relocation use

 17     Prevent multipathing/Suppress devices from VxVM's view

 18     Allow multipathing/Unsuppress devices from VxVM's view

 19     List currently suppressed/non-multipathed devices

 20     Change the disk naming scheme

 21     Get the newly connected/zoned disks in VxVM view

 list   List disk information

 

 

 ?      Display help about menu

 ??     Display help about the menuing system

 q      Exit from menus

 

 Select an operation to perform: 5

 

 

 Replace a failed or removed disk

 Menu: VolumeManager/Disk/ReplaceDisk

 

  Use this menu operation to specify a replacement disk for a disk

  that you removed with the "Remove a disk for replacement" menu

  operation, or that failed during use.  You will be prompted for

  a disk name to replace and a disk device to use as a replacement.

  You can choose an uninitialized disk, in which case the disk will

  be initialized, or you can choose a disk that you have already

  initialized using the Add or initialize a disk menu operation.

 

 Select a removed or failed disk [,list,q,?] list

 

 Disk group: rootdg

 

 DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE

 

 dm c1t3d0       -            -        -        -        REMOVED

 

 

 Select a removed or failed disk [,list,q,?] c1t3d0

 

 Select disk device to initialize [

,list,q,?] list

 

 DEVICE       DISK         GROUP        STATUS

 c1t0d0       rootdisk_2   rootdg       online

 c1t1d0       rootmirr_2   rootdg       online

 c1t2d0       c1t2d0       rootdg       online

 c1t3d0       -            -            error

 c2t8d0       -            -            online

 c2t9d0       -            -            online

 c2t10d0      -            -            online

 c2t11d0      -            -            online

 c2t12d0      -            -            online

 c3t8d0       -            -            online

 c3t9d0       -            -            online

 c3t10d0      -            -            online

 c3t11d0      -            -            online

 c3t12d0      -            -            online

 

 Select disk device to initialize [

,list,q,?] c1t3d0

 

  The following disk device has a valid VTOC, but does not appear to have

  been initialized for the Volume Manager.  If there is data on the disk

  that should NOT be destroyed you should encapsulate the existing disk

  partitions as volumes instead of adding the disk as a new disk.

  Output format: [Device_Name]

 

  c1t3d0

 

 Encapsulate this device? [y,n,q,?] (default: y) n

 

  c1t3d0

 

 Instead of encapsulating, initialize? [y,n,q,?] (default: n) y

 

  The requested operation is to initialize disk device c1t3d0 and

  to then use that device to replace the removed or failed disk

  c1t3d0 in disk group rootdg.

 

 Continue with operation? [y,n,q,?] (default: y) y

 

 Use fastresync for plex synchronization? [y,n,q,?] (default: n) y

 

 Use a default private region length for the disk?

 [y,n,q,?] (default: y)

 

  Replacement of disk c1t3d0 in group rootdg with disk device

  c1t3d0 completed successfully.

 

 Replace another disk? [y,n,q,?] (default: n)

 

 Volume Manager Support Operations

 Menu: VolumeManager/Disk

 

 1      Add or initialize one or more disks

 2      Encapsulate one or more disks

 3      Remove a disk

 4      Remove a disk for replacement

 5      Replace a failed or removed disk

 6      Mirror volumes on a disk

 7      Move volumes from a disk

 8      Enable access to (import) a disk group

 9      Remove access to (deport) a disk group

 10     Enable (online) a disk device

 11     Disable (offline) a disk device

 12     Mark a disk as a spare for a disk group

 13     Turn off the spare flag on a disk

 14     Unrelocate subdisks back to a disk

 15     Exclude a disk from hot-relocation use

 16     Make a disk available for hot-relocation use

 17     Prevent multipathing/Suppress devices from VxVM's view

 18     Allow multipathing/Unsuppress devices from VxVM's view

 

 

 Hit RETURN to continue.q

 

 Goodbye.

 root@ser2 # vxdisk list

 DEVICE       TYPE      DISK         GROUP        STATUS

 c1t0d0s2     sliced    rootdisk_2   rootdg       online

 c1t1d0s2     sliced    rootmirr_2   rootdg       online

 c1t2d0s2     sliced    c1t2d0       rootdg       online

 c1t3d0s2     sliced    c1t3d0       rootdg       online

 c2t8d0s2     sliced    -            -            online

 c2t9d0s2     sliced    -            -            online

 c2t10d0s2    sliced    -            -            online

 c2t11d0s2    sliced    -            -            online

 c2t12d0s2    sliced    -            -            online

 c3t8d0s2     sliced    -            -            online

 c3t9d0s2     sliced    -            -            online

 c3t10d0s2    sliced    -            -            online

 c3t11d0s2    sliced    -            -            online

 c3t12d0s2    sliced    -            -            online

 root@ser2 # vxtask list

 TASKID  PTID TYPE/STATE    PCT   PROGRESS

   165           PARENT/R  0.00% 2/0(1) VXRECOVER c1t3d0

   166   166     ATCOPY/R 02.99% 0/71303168/2131968 PLXATT lvmmsc lvmmsc-02

 root@ser2 # vxprint -ht 可以查看到这两个磁盘上建了两个逻辑卷,这两个磁盘之间做的是镜像:

 

 v  lvmmsc       -            ENABLED  ACTIVE   71303168 SELECT    -        fsgen

 pl lvmmsc-01    lvmmsc       ENABLED  ACTIVE   71303232 CONCAT    -        RW

 sd c1t2d0-02    lvmmsc-01    c1t2d0   71303232 71303232 0         c1t2d0   ENA

 pl lvmmsc-02    lvmmsc       ENABLED  STALE    71303232 CONCAT    -        WO

 sd c1t3d0-02    lvmmsc-02    c1t3d0   71303232 71303232 0         c1t3d0   RLOC

 

 v  lvoracle     -            ENABLED  ACTIVE   71303168 SELECT    -        fsgen

 pl lvoracle-01  lvoracle     ENABLED  ACTIVE   71303232 CONCAT    -        RW

 sd c1t2d0-01    lvoracle-01  c1t2d0   0        71303232 0         c1t2d0   ENA

 pl lvoracle-02  lvoracle     ENABLED  STALE    71303232 CONCAT    -        RW

 sd c1t3d0-01    lvoracle-02  c1t3d0   0        71303232 0         c1t3d0   ENA

 

 但是这两个卷中c1t3d0对应的pl的状态在换完磁盘后状态不正常(ENABLED  STALE),正常状态应该是:ENABLED  ACTIVE的,所以需要修复,修复命令如下:

 # vxmend -g rootdg clear all lvmmsc lvmmsc-02

 # vxplex -g rootdg dis lvmmsc-02

 # vxplex -g rootdg att lvmmsc lvmmsc-02

 

 # vxmend -g rootdg clear all lvoracle lvoracle-02

 # vxplex -g rootdg dis lvoracle-02

 # vxplex -g rootdg att lvoracle lvoracle-02

 

 修复完后用vxtask list查看后台同步信息!

 

还有一个方法:

 

root@ser2 # vxdiskadm ->4 Remove a disk for replacement

 root@ser2 # vxdisk offline c1t3d0s2

 root@ser2 # cfgadm –c unconfigure c1::dsk/c1t3d0

 

 硬盘蓝灯亮,更换硬盘

 root@ser2 # cfgadm –c configure c1::dsk/c1t3d0

 root@ser2 # /usr/sbin/devfsadm -C -c disk

 root@ser2 # devfsadm (执行后format命令显示正常)

 root@ser2 # vxdctl enable

 root@ser2 # vxdiskadm ->5 Replace a failed or removed disk

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