ZFS 池处于永久重新同步循环中,无法分离/删除设备

ZFS 池处于永久重新同步循环中,无法分离/删除设备

我的泳池:

❯ zpool status
pool: wdblack
state: ONLINE
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 Mon Oct  5 13:35:14 2020
2.84T scanned at 586M/s, 852G issued at 172M/s, 9.52T total
66.5M resilvered, 8.74% done, 0 days 14:44:07 to go
remove: Removal of vdev 0 copied 5.99T in 15h17m, completed on Sat Jun  6 03:15:41 2020
29.5M memory used for removed device mappings
config:

NAME                                     STATE     READ WRITE CKSUM
wdblack                                  ONLINE       0     0     0
wwn-0x50014ee26390e982                 ONLINE       0     0    82
wwn-0x5000cca27ec99833-part1           ONLINE       0     0  264K  (resilvering)
ata-WDC_WD80EZAZ-11TDBA0_JEH52XAN      ONLINE       0     0     0
ata-GOODRAM_C100_FF180744082600124110  ONLINE       0     0     0
sdg                                    ONLINE       0     0     0

-part1 已经处于重新同步循环一周了。它每次都会自行启动。

ZFS特点:

NAME     PROPERTY              VALUE                  SOURCE
wdblack  type                  filesystem             -
wdblack  creation              Sat Mar  9 10:54 2019  -
wdblack  used                  9.56T                  -
wdblack  available             10.5T                  -
wdblack  referenced            96K                    -
wdblack  compressratio         1.00x                  -
wdblack  mounted               yes                    -
wdblack  quota                 none                   default
wdblack  reservation           none                   default
wdblack  recordsize            128K                   local
wdblack  mountpoint            /home/agilob/disk      local
wdblack  sharenfs              off                    default
wdblack  checksum              on                     default
wdblack  compression           off                    default
wdblack  atime                 off                    local
wdblack  devices               on                     default
wdblack  exec                  on                     default
wdblack  setuid                on                     default
wdblack  readonly              off                    default
wdblack  zoned                 off                    default
wdblack  snapdir               hidden                 default
wdblack  aclinherit            restricted             default
wdblack  createtxg             1                      -
wdblack  canmount              on                     default
wdblack  xattr                 on                     default
wdblack  copies                1                      default
wdblack  version               5                      -
wdblack  utf8only              off                    -
wdblack  normalization         none                   -
wdblack  casesensitivity       sensitive              -
wdblack  vscan                 off                    default
wdblack  nbmand                off                    default
wdblack  sharesmb              off                    default
wdblack  refquota              none                   default
wdblack  refreservation        none                   default
wdblack  guid                  5626685650647801653    -
wdblack  primarycache          all                    default
wdblack  secondarycache        all                    default
wdblack  usedbysnapshots       0B                     -
wdblack  usedbydataset         96K                    -
wdblack  usedbychildren        9.56T                  -
wdblack  usedbyrefreservation  0B                     -
wdblack  logbias               latency                default
wdblack  objsetid              51                     -
wdblack  dedup                 off                    default
wdblack  mlslabel              none                   default
wdblack  sync                  standard               default
wdblack  dnodesize             legacy                 default
wdblack  refcompressratio      1.00x                  -
wdblack  written               96K                    -
wdblack  logicalused           9.56T                  -
wdblack  logicalreferenced     42K                    -
wdblack  volmode               default                default
wdblack  filesystem_limit      none                   default
wdblack  snapshot_limit        none                   default
wdblack  filesystem_count      none                   default
wdblack  snapshot_count        none                   default
wdblack  snapdev               hidden                 default
wdblack  acltype               off                    default
wdblack  context               none                   default
wdblack  fscontext             none                   default
wdblack  defcontext            none                   default
wdblack  rootcontext           none                   default
wdblack  relatime              off                    local
wdblack  redundant_metadata    all                    default
wdblack  overlay               off                    default
wdblack  encryption            off                    default
wdblack  keylocation           none                   default
wdblack  keyformat             none                   default
wdblack  pbkdf2iters           0                      default
wdblack  special_small_blocks  0                      default

我无法分离任何设备,即使是那些没有重新同步的设备

❯ sudo zpool detach wdblack /dev/sdg
cannot detach /dev/sdg: only applicable to mirror and replacing vdevs
❯ sudo zpool detach wdblack wwn-0x5000cca27ec99833-part1
cannot detach wwn-0x5000cca27ec99833-part1: only applicable to mirror and replacing vdevs

那么也无法删除

❯ sudo zpool remove wdblack wwn-0x5000cca27ec99833-part1
cannot remove wwn-0x5000cca27ec99833-part1: Pool busy; removal may already be in progress
❯ sudo zpool remove wdblack sdg
cannot remove sdg: invalid config; all top-level vdevs must have the same sector size and not be raidz.

如果我没记错的话,重新同步在开始清理后就开始了,这是无法更改的:

❯ sudo zpool scrub -s wdblack
cannot cancel scrubbing wdblack: currently resilvering
❯ sudo zpool scrub wdblack
cannot scrub wdblack: currently resilvering

zpool status wdblack报告有文件损坏,但数量“随机”变化,通常在 7 个(最常见)到超过 3000000 个之间,现在是errors: 259134 data errors, use '-v' for a list

我的池中所有文件的数量超过 300000!

现在它报告超过 259k 错误,但是当我 sudo 时zpool status wdblack -v它只能打印 7 个文件,而不是 259k。

在撰写本文时我正在使用 archlinux

Linux 5.8.12-arch1-1 #1 SMP PREEMPT Sat, 26 Sep 2020 21:42:58 +0000 x86_64 GNU/Linux
❯ zfs version
zfs-0.8.4-1
zfs-kmod-0.8.4-1

编辑:

完成后立即开始重新同步

Oct  6 2020 18:41:03.798523850 sysevent.fs.zfs.resilver_finish
version = 0x0
class = "sysevent.fs.zfs.resilver_finish"
pool = "wdblack"
pool_guid = 0x509d876228a22ecc
pool_state = 0x0
pool_context = 0x0
time = 0x5f7cac2f 0x2f9881ca 
eid = 0x27e4e

Oct  6 2020 18:41:03.798523850 sysevent.fs.zfs.history_event
version = 0x0
class = "sysevent.fs.zfs.history_event"
pool = "wdblack"
pool_guid = 0x509d876228a22ecc
pool_state = 0x0
pool_context = 0x0
history_hostname = "slave"
history_internal_str = "errors=159477"
history_internal_name = "starting deferred resilver"
history_txg = 0x7246f3
history_time = 0x5f7cac2f
time = 0x5f7cac2f 0x2f9881ca 
eid = 0x27e4f

Oct  6 2020 18:41:09.005195427 sysevent.fs.zfs.resilver_start
version = 0x0
class = "sysevent.fs.zfs.resilver_start"
pool = "wdblack"
pool_guid = 0x509d876228a22ecc
pool_state = 0x0
pool_context = 0x0
time = 0x5f7cac35 0x4f46a3
eid = 0x27e50

答案1

这种情况发生在我身上一次,当一个重新同步循环完成后,我就对池进行了一次擦洗。它没有发现任何错误,但重新同步停止循环。之后我就能够删除和更换驱动器

更新:

好吧,好吧,好吧,你看看吧。在您最后发表评论 3 小时后,他们修复了该问题。自 5 月 4 日以来一直在进行中,他们发布了包含修复程序的 0.8.5。https://github.com/openzfs/zfs/pull/10291

不幸的是,您必须构建 ZFS 才能进行此修复。

或者查找包含 0.8.5 版软件包的可信来源。

您可以从这里获取 ZFS 源:https://github.com/openzfs/zfs/releases/tag/zfs-0.8.5

这是你的幸运日! :)

相关内容