努力使用 zpool 删除 Centos 7 上出现故障的 ZFS 池

努力使用 zpool 删除 Centos 7 上出现故障的 ZFS 池

我最近在一台新服务器上对 ZFS 进行了大量测试。

我现在已准备好将此服务器投入生产,但我想知道是否可以在此之前摆脱旧的“有故障”的磁盘池,以保持整洁。

所以如果我运行 zpool import,我会看到以下内容...

[root@localhost /]# zpool import
 pool: diskpool
 id: 18370547499919589045
 state: UNAVAIL
 status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
 see: http://zfsonlinux.org/msg/ZFS-8000-5E
config:

    diskpool                              UNAVAIL  insufficient replicas
      raidz2-1                            UNAVAIL  insufficient replicas
        ata-ST8000AS0002-1NA17Z_Z840DNW0  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DG92  ONLINE
        ata-ST8000AS0002-1NA17Z_Z840DT6G  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DVJ2  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DLL4  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DLVR  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DLPB  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DAMG  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DCEN  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DA8Q  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DAXK  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840D27A  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DA95  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DFEK  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DA6R  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DSWR  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DNNN  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840CVPT  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DNKW  FAULTED  corrupted data
        ata-ST8000AS0002-1NA17Z_Z840DNPK  FAULTED  corrupted data

我尝试使用 zpool destroy diskpool 删除“diskpool”,但无济于事......

[root@localhost /]# zpool destroy diskpool
cannot open 'diskpool': no such pool

我已经重新启动并完成了我能想到的大部分事情,但它不允许我删除这些旧数据。

我知道我基本上可以忽略它,因为一旦我创建了生产池,它就只是不相关的旧数据,但如果我可以删除它那就太好了。

有任何想法吗?

答案1

看起来唯一记住“diskpool”池的磁盘是 ata-ST8000AS0002-1NA17Z_Z840DG92,因此您可以做的是覆盖该磁盘上的标签:

# zpool create -f foo ata-ST8000AS0002-1NA17Z_Z840DG92
# zpool destroy foo

这应该可以防止“zpool import”命令看到长期失效的磁盘池。请小心确保 ata-ST8000AS0002-1NA17Z_Z840DG92 未被使用任何其他池首先在您的系统中。

相关内容