MrtWGY 发表于 2016-09-05 09:35

求助!ZFS+VXVM更换硬盘

小弟这边有一套设备是用ZFS做的mirror,执行换盘操作时报错说该硬盘在VXVM上使用无法删除,烦请各位大神指导下该如何处理,要用VXVM把这块盘删除?以下为处理日志
# zpool status rpool
pool: rpool
state: DEGRADED
status: One or more devices could not be opened.Sufficient replicas exist for
      the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
   see:
scrub: none requested
config:

      NAME          STATE   READ WRITE CKSUM
      rpool         DEGRADED   0   0   0
          mirror      DEGRADED   0   0   0
            c0t1d0s0ONLINE       0   0   0
            c0t0d0s0UNAVAIL      0   0   0cannot open
errors: No known data errors
# zpool offline rpool c0t0d0s0
cannot offline c0t0d0s0: no valid replicas
root@sams1-repdb # cfgadm -c unconfigure c0::dsk/c0t0d0
Aug 12 10:07:54 sams1-repdb rcm_daemon: rcm script es_rcm.pl: VxVM vxdmpadm ERROR V-5-1-13080 Attempt to disable all paths through portid and enclosure failed. Last path to the disk can not be disabled.
cfgadm: Component system is busy, try again: failed to offline:
   Resource            Information      
-------------------------------------------
/dev/dsk/c0t0d0s2   Device being used by VxVM
# vxdisk list
DEVICE       TYPE            DISK         GROUP      STATUS
disk_0       auto:none       -            -            online invalid
disk_2       auto            -            -            error
fj_e80000_0auto:cdsdisk    -            -            online
fj_e80000_1auto:cdsdisk    sysdg01      sysdg      online shared
fj_e80000_2auto:cdsdisk    userdg103    userdg1      online shared
fj_e80000_3auto:cdsdisk    userdg201    userdg2      online shared
fj_e80000_4auto:cdsdisk    indexdg101   indexdg1   online shared
fj_e80000_5auto:cdsdisk    -            -            online
fj_e80000_6auto:cdsdisk    sysdg06      sysdg      online shared
fj_e80000_7auto:cdsdisk    userdg106    userdg1      online shared
fj_e80000_8auto:cdsdisk    userdg206    userdg2      online shared
fj_e80000_9auto:cdsdisk    indexdg106   indexdg1   online shared
fj_e80000_10 auto:cdsdisk    -            -            online


nimysun 发表于 2016-09-05 20:50

回复 1# MrtWGY
大概其你是吧vxvm的rootdg建在了zfs的盘上面了,最好别把这两个东西揉在一起,要么全部vxvm算了。思路肯定是把这个c0t0d0从vxvm的configuration中删除,然后换盘,确保c0t0和c0t1的partition label是一样的,加vxvm,然后zpool replace, 然后可能需要installgrub/install bootblock。
搭建系统时,谁给的方案啊。。。真是忍不住吐槽啊。

antonypaopao 发表于 2016-09-06 10:42

本帖最后由 antonypaopao 于 2016-09-06 10:45 编辑

都unavil了 offline不掉的直接zpool detach 换盘 再attach上,看看有报错吗或者直接zpool replace 如果有报错 在根据这个报错看看如何解决   你这估计是先用vxvm封装了 然后又用了zfs 真是醉了

119beyond 发表于 2016-09-07 15:27

奇葩,奇葩

MrtWGY 发表于 2016-09-23 17:04

故障已解决!!!!!

处理过程如下:
1、因该硬盘没有被VXVM封装并且format中已识别不到该硬盘,直接执行物理更换硬盘,更换完成后vxdisk lisk查看状态
更换后可以看到disk_2的状态变为nolabel
DEVICE       DISK         GROUP      STATUS
disk_0       -            -            online invalid
disk_2       -            -            nolabel
对该硬盘做下label,状态变为online invalid
2、开始执行replace操作
# prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2
# zpool replace rpool c0t0d0s0
# zpool online rpool c0t0d0s0
# zpool status
pool: rpool
state: DEGRADED
status: One or more devices is currently being resilvered.The pool will
      continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scrub: resilver in progress for 0h0m, 0.01% done, 14h56m to go
config:

      NAME                STATE   READ WRITE CKSUM
      rpool               DEGRADED   0   0   0
          mirror            DEGRADED   0   0   0
            c0t1d0s0      ONLINE       0   0   0
            replacing       DEGRADED   0   0   0
            c0t0d0s0/oldFAULTED      0   0   0corrupted data
            c0t0d0s0      ONLINE       0   0   0
操作完成后硬盘开始同步,多了一个old信息,等待硬盘同步完成后将该项删除,恢复正常

ac220v 发表于 2016-11-16 14:51

在多路径中做排除就好了
页: [1]
查看完整版本: 求助!ZFS+VXVM更换硬盘