ZFS 故障池损坏数据,重新镀银已完成,路径不正确,io 错误

ZFS 故障池损坏数据,重新镀银已完成,路径不正确,io 错误

我最近遇到了磁盘故障,为此我得到了一个替换磁盘,并成功更换了磁盘并完成了重新同步过程。我能够通过 samba 毫无问题地使用 raidz2,但随后按照 zfs 的提示清除错误,命令“冻结”并且没有输出。我让它过了一夜,由于早上仍然没有显示任何内容,我终止了命令,但仍然没有任何反应,所以我只是关闭了与它的 putty ssh 连接。此后,无论我尝试什么,我都无法访问数据、导入或导入池。

系统在 ubuntu(主机名为 UBUNTU-SERVER-KVM)上,我在其上安装了另一个虚拟 ubuntu(主机名为 ubuntu-server),它通常通过 samba 共享访问 zfs(我从未弄清楚如何让它在虚拟机中直接访问)。我怀疑我可能在主 ubuntu-kvm 上完成了部分 zfs 工作,在虚拟 ubuntu 安装上完成了部分工作。我担心这会导致我的问题,我无法以任何方式导入池。ubuntu-kvm 机器的 zpool.cache 显示“旧”池设置,其中有死驱动器,而不是新驱动器。这似乎证实了我错误地在虚拟 ubuntu 机器上执行了重新同步,而不是通常具有 zpool 的 ubuntu-kvm。

我有一种感觉,如果我能以某种方式纠正池尝试导入的路径,我的数据仍然会在那里,因为重新同步过程已完成,我之前能够访问它。虚拟 ubuntu 将其驱动器称为“/dev/vd*”,而托管虚拟机的 ubuntu-kvm 将它们显示为“/dev/sd*”。

有人知道我下一步该怎么做才能恢复数据吗?是的,我确实在云端备份了最重要的部分,但还有很多其他东西丢失了,我宁愿它们没有丢失 :)

以下是一些希望对您有帮助的信息:

导入尝试

    user@UBUNTU-SERVER-KVM ~> sudo zpool import
       pool: tank
         id: 3866261861707315207
      state: FAULTED
     status: One or more devices were being resilvered.
     action: The pool cannot be imported due to damaged devices or data.
            The pool may be active on another system, but can be imported using
            the '-f' flag.
     config:

            tank                  FAULTED  corrupted data
              raidz2-0                DEGRADED
                sdc                   ONLINE
                sdf                   ONLINE
                replacing-2           DEGRADED
                  352909589583250342  OFFLINE
                  sde                 ONLINE
                sda                   ONLINE
                sdd                   ONLINE
                sdb                   ONLINE
    user@UBUNTU-SERVER-KVM ~> sudo zpool import -f tank
    cannot import 'tank': I/O error
            Destroy and re-create the pool from
            a backup source.
    user7@UBUNTU-SERVER-KVM ~> sudo zpool import -d /dev/disk/by-id/ tank
    cannot import 'tank': I/O error
            Destroy and re-create the pool from
            a backup source.

韓財

     user@UBUNTU-SERVER-KVM ~> sudo zdb
        tank:
            version: 5000
            name: 'tank'
            state: 0
            txg: 15981041
            pool_guid: 3866261861707315207
            errata: 0
            hostname: 'UBUNTU-SERVER-KVM'
            vdev_children: 1
            vdev_tree:
                type: 'root'
                id: 0
                guid: 3866261861707315207
                children[0]:
                    type: 'raidz'
                    id: 0
                    guid: 2520364627045826300
                    nparity: 2
                    metaslab_array: 34
                    metaslab_shift: 38
                    ashift: 12
                    asize: 36006962135040
                    is_log: 0
                    create_txg: 4
                    children[0]:
                        type: 'disk'
                        id: 0
                        guid: 4891017201165304687
                        path: '/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-***-part1'
                        whole_disk: 1
                        DTL: 241
                        create_txg: 4
                    children[1]:
                        type: 'disk'
                        id: 1
                        guid: 7457881130536207675
                        path: '/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-***-part1'
                        whole_disk: 1
                        DTL: 240
                        create_txg: 4
                    children[2]:
                        type: 'disk'
                        id: 2
                        guid: 352909589583250342
                        path: '/dev/vde1'
                        whole_disk: 1
                        not_present: 1
                        DTL: 159
                        create_txg: 4
                    children[3]:
                        type: 'disk'
                        id: 3
                        guid: 10598130582029967766
                        path: '/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-***-part1'
                        whole_disk: 1
                        DTL: 239
                        create_txg: 4
                    children[4]:
                        type: 'disk'
                        id: 4
                        guid: 1949004718048415909
                        path: '/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-***-part1'
                        whole_disk: 1
                        DTL: 238
                        create_txg: 4
                    children[5]:
                        type: 'disk'
                        id: 5
                        guid: 13752847360965334531
                        path: '/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-***-part1'
                        whole_disk: 1
                        DTL: 237
                        create_txg: 4
            features_for_read:
                com.delphix:hole_birth
                com.delphix:embedded_data

zdb -l /dev/sde1

 user@UBUNTU-SERVER-KVM ~> sudo zdb -l /dev/sde1
    --------------------------------------------
    LABEL 0
    --------------------------------------------
        version: 5000
        name: 'tank'
        state: 0
        txg: 15981229
        pool_guid: 3866261861707315207
        errata: 0
        hostname: 'ubuntu-server'
        top_guid: 2520364627045826300
        guid: 1885359927145031384
        vdev_children: 1
        vdev_tree:
            type: 'raidz'
            id: 0
            guid: 2520364627045826300
            nparity: 2
            metaslab_array: 34
            metaslab_shift: 38
            ashift: 12
            asize: 36006962135040
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 4891017201165304687
                path: '/dev/vdc1'
                whole_disk: 1
                DTL: 241
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 7457881130536207675
                path: '/dev/vdf1'
                whole_disk: 1
                DTL: 240
                create_txg: 4
            children[2]:
                type: 'replacing'
                id: 2
                guid: 9514120513744452300
                whole_disk: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 352909589583250342
                    path: '/dev/vde1/old'
                    whole_disk: 1
                    not_present: 1
                    DTL: 159
                    create_txg: 4
                    offline: 1
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 1885359927145031384
                    path: '/dev/vde1'
                    whole_disk: 1
                    DTL: 231
                    create_txg: 4
                    resilver_txg: 15981226
            children[3]:
                type: 'disk'
                id: 3
                guid: 10598130582029967766
                path: '/dev/vdg1'
                whole_disk: 1
                DTL: 239
                create_txg: 4
            children[4]:
                type: 'disk'
                id: 4
                guid: 1949004718048415909
                path: '/dev/vdd1'
                whole_disk: 1
                DTL: 238
                create_txg: 4
            children[5]:
                type: 'disk'
                id: 5
                guid: 13752847360965334531
                path: '/dev/vdb1'
                whole_disk: 1
                DTL: 237
                create_txg: 4
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data
    --------------------------------------------
    LABEL 1
    --------------------------------------------
        version: 5000
        name: 'tank'
        state: 0
        txg: 15981229
        pool_guid: 3866261861707315207
        errata: 0
        hostname: 'ubuntu-server'
        top_guid: 2520364627045826300
        guid: 1885359927145031384
        vdev_children: 1
        vdev_tree:
            type: 'raidz'
            id: 0
            guid: 2520364627045826300
            nparity: 2
            metaslab_array: 34
            metaslab_shift: 38
            ashift: 12
            asize: 36006962135040
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 4891017201165304687
                path: '/dev/vdc1'
                whole_disk: 1
                DTL: 241
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 7457881130536207675
                path: '/dev/vdf1'
                whole_disk: 1
                DTL: 240
                create_txg: 4
            children[2]:
                type: 'replacing'
                id: 2
                guid: 9514120513744452300
                whole_disk: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 352909589583250342
                    path: '/dev/vde1/old'
                    whole_disk: 1
                    not_present: 1
                    DTL: 159
                    create_txg: 4
                    offline: 1
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 1885359927145031384
                    path: '/dev/vde1'
                    whole_disk: 1
                    DTL: 231
                    create_txg: 4
                    resilver_txg: 15981226
            children[3]:
                type: 'disk'
                id: 3
                guid: 10598130582029967766
                path: '/dev/vdg1'
                whole_disk: 1
                DTL: 239
                create_txg: 4
            children[4]:
                type: 'disk'
                id: 4
                guid: 1949004718048415909
                path: '/dev/vdd1'
                whole_disk: 1
                DTL: 238
                create_txg: 4
            children[5]:
                type: 'disk'
                id: 5
                guid: 13752847360965334531
                path: '/dev/vdb1'
                whole_disk: 1
                DTL: 237
                create_txg: 4
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data
    --------------------------------------------
    LABEL 2
    --------------------------------------------
        version: 5000
        name: 'tank'
        state: 0
        txg: 15981229
        pool_guid: 3866261861707315207
        errata: 0
        hostname: 'ubuntu-server'
        top_guid: 2520364627045826300
        guid: 1885359927145031384
        vdev_children: 1
        vdev_tree:
            type: 'raidz'
            id: 0
            guid: 2520364627045826300
            nparity: 2
            metaslab_array: 34
            metaslab_shift: 38
            ashift: 12
            asize: 36006962135040
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 4891017201165304687
                path: '/dev/vdc1'
                whole_disk: 1
                DTL: 241
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 7457881130536207675
                path: '/dev/vdf1'
                whole_disk: 1
                DTL: 240
                create_txg: 4
            children[2]:
                type: 'replacing'
                id: 2
                guid: 9514120513744452300
                whole_disk: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 352909589583250342
                    path: '/dev/vde1/old'
                    whole_disk: 1
                    not_present: 1
                    DTL: 159
                    create_txg: 4
                    offline: 1
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 1885359927145031384
                    path: '/dev/vde1'
                    whole_disk: 1
                    DTL: 231
                    create_txg: 4
                    resilver_txg: 15981226
            children[3]:
                type: 'disk'
                id: 3
                guid: 10598130582029967766
                path: '/dev/vdg1'
                whole_disk: 1
                DTL: 239
                create_txg: 4
            children[4]:
                type: 'disk'
                id: 4
                guid: 1949004718048415909
                path: '/dev/vdd1'
                whole_disk: 1
                DTL: 238
                create_txg: 4
            children[5]:
                type: 'disk'
                id: 5
                guid: 13752847360965334531
                path: '/dev/vdb1'
                whole_disk: 1
                DTL: 237
                create_txg: 4
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data
    --------------------------------------------
    LABEL 3
    --------------------------------------------
        version: 5000
        name: 'tank'
        state: 0
        txg: 15981229
        pool_guid: 3866261861707315207
        errata: 0
        hostname: 'ubuntu-server'
        top_guid: 2520364627045826300
        guid: 1885359927145031384
        vdev_children: 1
        vdev_tree:
            type: 'raidz'
            id: 0
            guid: 2520364627045826300
            nparity: 2
            metaslab_array: 34
            metaslab_shift: 38
            ashift: 12
            asize: 36006962135040
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 4891017201165304687
                path: '/dev/vdc1'
                whole_disk: 1
                DTL: 241
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 7457881130536207675
                path: '/dev/vdf1'
                whole_disk: 1
                DTL: 240
                create_txg: 4
            children[2]:
                type: 'replacing'
                id: 2
                guid: 9514120513744452300
                whole_disk: 0
                create_txg: 4
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 352909589583250342
                    path: '/dev/vde1/old'
                    whole_disk: 1
                    not_present: 1
                    DTL: 159
                    create_txg: 4
                    offline: 1
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 1885359927145031384
                    path: '/dev/vde1'
                    whole_disk: 1
                    DTL: 231
                    create_txg: 4
                    resilver_txg: 15981226
            children[3]:
                type: 'disk'
                id: 3
                guid: 10598130582029967766
                path: '/dev/vdg1'
                whole_disk: 1
                DTL: 239
                create_txg: 4
            children[4]:
                type: 'disk'
                id: 4
                guid: 1949004718048415909
                path: '/dev/vdd1'
                whole_disk: 1
                DTL: 238
                create_txg: 4
            children[5]:
                type: 'disk'
                id: 5
                guid: 13752847360965334531
                path: '/dev/vdb1'
                whole_disk: 1
                DTL: 237
                create_txg: 4
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data

EDIT1:使用一个神奇的、未定义的选项,我无法确定它做了什么,似乎我能够导入池,尽管 zpool iostat 显示一个空表,但我无法执行清理,因为它显示“池当前不可用”,历史记录未返回任何内容,“zdb -u tank”返回“zdb:无法打开‘tank’:输入/输出错误”,无法将旧的死硬盘分离为。操作也从“由于设备或数据损坏而无法导入。”更改为“等待重新同步完成”,但重新同步以“1/s”的速度进行,配置列表显示没有任何驱动器正在重新同步。这种情况已经持续了几天,而重新同步的数量或百分比没有任何变化。

user@ubuntu-server ~> sudo zpool import -fFV
   pool: tank
     id: 3866261861707315207
  state: FAULTED
 status: One or more devices were being resilvered.
 action: The pool cannot be imported due to damaged devices or data.
        The pool may be active on another system, but can be imported using
        the '-f' flag.
 config:

        tank                  FAULTED  corrupted data
          raidz2-0                DEGRADED
            vdc                   ONLINE
            vdf                   ONLINE
            replacing-2           DEGRADED
              352909589583250342  OFFLINE
              vde                 ONLINE
            vdg                   ONLINE
            vdd                   ONLINE
            vdb                   ONLINE

user@ubuntu-server ~> sudo zpool import -fFV tank
user@ubuntu-server ~> sudo zpool status
  pool: tank
 state: FAULTED
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.
  scan: resilver in progress since Thu Nov  1 21:02:15 2018
    31.0T scanned out of 31.0T at 1/s, (scan is slow, no estimated time)
    5.17T resilvered, 100.02% done
config:

        NAME                      STATE     READ WRITE CKSUM
        tank                  FAULTED      0     0     1  corrupted data
          raidz2-0                DEGRADED     0     0     6
            vdc                   ONLINE       0     0     0
            vdf                   ONLINE       0     0     0
            replacing-2           DEGRADED     0     0     0
              352909589583250342  OFFLINE      0     0     0  was /dev/vde1/old
              vde                 ONLINE       0     0     0
            vdg                   ONLINE       0     0     0
            vdd                   ONLINE       0     0     0
            vdb                   ONLINE       0     0     0



user@ubuntu-server /tank> sudo zpool detach tank 352909589583250342
cannot open 'tank': pool is unavailable

相关内容