Solaris 10 x86 – 试图replacezpool中的磁盘

我在更换x86处理器上运行Solaris 10的系统上的现有zpool上的磁盘时遇到问题。 zpool最初是使用两个镜像片创build的。 其中一个驱动器出现故障,所以我换了一个新驱动器。 我运行prvtoc和fmthard将磁盘标签从工作驱动器复制到新驱动器上:

prtvtoc /dev/rdsk/c1t0d0s2 >/tmp/c1t0d0s2.out fmthard -s /tmp/c1t0d0s2.out >/dev/rdsk/c1t1d0s2 

然后,我尝试将新驱动器联机并收到关于设备仍然出现故障的警告:

 $ zpool online pool c1t1d0s6 warning: device 'c1t1d0s6' onlined, but remains in faulted state 

zpool status -v的输出是:

 NAME STATE READ WRITE CKSUM pool DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 c1t0d0s6 ONLINE 0 0 0 c1t1d0s6 UNAVAIL 0 0 0 corrupted data 

(c1t1d0是更换的驱动器。)

然后,我再次使c1t1d0脱机,并尝试运行zpool replace命令,但是这不起作用:

 $ zpool replace pool c1t1d0s6 invalid vdev specification use '-f' to override the following errors: /dev/dsk/c1t1d0s6 overlaps with /dev/dsk/c1t1d0s2 

有谁知道发生了什么事? 使用'-f'标志是否安全?

编辑:运行zpoolreplace-f后,我得到:

 pool: pool state: DEGRADED status: The pool is formatted using an older on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on older software versions. scrub: none requested config: NAME STATE READ WRITE CKSUM pool DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 c1t0d0s6 ONLINE 0 0 0 replacing-1 UNAVAIL 0 0 0 insufficient replicas c1t1d0s6/old OFFLINE 0 0 0 c1t1d0s6 UNAVAIL 0 342 0 experienced I/O failures 

我在iostat -e输出中看到新驱动器上的错误。 我想新的驱动器也可能不好?

编辑2 :我不知道发生了什么事。 我用相同的程序尝试了不同的驱动器。 在运行zpool replace -f之后,zfs池运行一个scrub,但状态输出为:

  pool: pool state: ONLINE status: The pool is formatted using an older on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on older software versions. scrub: scrub completed after 12h56m with 0 errors on Wed Aug 29 06:49:16 2012 config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c1t0d0s6 ONLINE 0 0 0 replacing-1 ONLINE 5.54M 19.9M 0 c1t1d0s6/old UNAVAIL 0 0 0 corrupted data c1t1d0s6 UNAVAIL 0 0 0 corrupted data 

离线c1t1d0s6之后,zpool状态输出为:

  pool: pool state: ONLINE status: The pool is formatted using an older on-disk format. The pool can still be used, but some features are unavailable. action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on older software versions. scrub: scrub completed after 12h56m with 0 errors on Wed Aug 29 06:49:16 2012 config: NAME STATE READ WRITE CKSUM pool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c1t0d0s6 ONLINE 0 0 0 replacing-1 ONLINE 5.54M 19.9M 0 c1t1d0s6/old UNAVAIL 0 0 0 corrupted data c1t1d0s6 UNAVAIL 0 0 0 corrupted data 

我不明白。 系统不能用c1t0d0s6上的镜像replacec1t1d0s6吗?

你是否清除fmadm的警报? 而zpool clear …使用-f开关运行zpoolreplace是安全的,但我认为你的声明是错误的,除非你已经删除了坏的磁盘。

http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/index.html

检查电缆或驱动器底座和插槽。 嘈杂的SATA连接将产生错误,fmadm使用该信息来确定设备何时发生故障。 我有驱动器,我认为是不好的,但只是ZFS注意到它没有得到有效的数据可靠。 我注意到一个捏的SATA电缆,取而代之的是运行zpool clearzpool scrub ,没有更多的错误。