Solaris 10 x86-尝试替换 zpool 中的磁盘

Solaris 10 x86-尝试替换 zpool 中的磁盘

我在 x86 处理器上运行 Solaris 10 的系统上更换现有 zpool 上的磁盘时遇到了麻烦。zpool 最初是用两个镜像切片创建的。其中一个驱动器发生故障,因此我用新驱动器进行了物理交换。我运行了 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' 标志安全吗?

编辑:运行 zpool replace -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 池运行了清理,但状态输出为:

  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 status 输出为:

  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 上的镜像来替换 c1t1d0s6 吗?

答案1

你清除了警报了吗fmadm?还有zpool clear...使用开关运行 zpool replace 是安全的-f,但我认为你的说法是错误的,除非你已经移除了坏磁盘。

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

答案2

检查电缆或驱动器托架和插槽。嘈杂的 SATA 连接会产生错误,fmadm 会使用该信息来确定设备何时出现故障。我曾有过我认为有问题的驱动器,但只是 ZFS 注意到它无法可靠地获取有效数据。我注意到 SATA 电缆被夹住了,更换了它并运行zpool clearzpool scrub没有出现更多错误。

相关内容