从故障设备中卸载“挂载”zfs 池

从故障设备中卸载“挂载”zfs 池

我在托管于单个 USB 设备上的 LUKS 设备上运行 zfs。设备出现故障(可能是电缆/连接不良,因为磁盘在另一台机器上读取正常)。

但是我如何强制 GNU/Linux 忘记该设备呢?

$ zpool status

  pool: freenetpool
 state: SUSPENDED
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool clear'.
   see: http://zfsonlinux.org/msg/ZFS-8000-HC
  scan: scrub repaired 0B in 0 days 05:09:40 with 0 errors on Sun May 10 05:37:46 2020
config:

        NAME         STATE     READ WRITE CKSUM
        freenetpool  DEGRADED     0     0     0
          freenet    DEGRADED     3   344     0  too many errors

errors: 5263 data errors, use '-v' for a list

$ sudo zpool export freenetpool
umount: /freenet: target is busy.
cannot unmount '/freenet': umount failed
$ lsof /freenet | field 2 | grep -v PID | uniq | xargs kill -9
$ sudo umount -l /freenet/
(OK)
$ sudo zpool export freenetpool
cannot export 'freenetpool': pool I/O is currently suspended
$ sudo zpool clear freenetpool
cannot clear errors for freenetpool: I/O error
$ sudo zpool clear -F freenetpool
cannot clear errors for freenetpool: I/O error
$ sudo zpool clear -FX freenetpool
cannot clear errors for freenetpool: I/O error
$ sudo zpool clear -nFX freenetpool
(OK)
$ sudo zfs unmount /freenet
cannot unmount '/freenet': not a mountpoint
$ sudo zpool destroy -f freenetpool
cannot open 'freenetpool': pool I/O is currently suspended
$ zpool detach  freenetpool freenet
cannot detach freenet: pool I/O is currently suspended
$ zpool remove freenetpool freenet
cannot remove freenet: pool I/O is currently suspended
$ zpool remove freenetpool /dev/mapper/freenet
cannot remove /dev/mapper/freenet: pool I/O is currently suspended
$ zpool set cachefile=/etc/zfs/zpool.cache freenetpool
cannot set property for 'freenetpool': pool I/O is currently suspended

我可以重新启动机器,但我真的很想知道一种避免重新启动的方法。

答案1

一旦池被暂停,就无法取消暂停。您必须重新启动机器。

相关内容