因此,连接到我的 FreeNas 7 系统上的 USB 驱动器出现故障,因此我利用这种情况作为升级到 FreeNas 8 的机会。现在的问题是我无法启动 ZFS:
[root@media] ~# zpool import
pool: filetank
id: 17702465758427828599
state: FAULTED
status: The pool was last accessed by another system.
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.
see: http://www.sun.com/msg/ZFS-8000-EY
config:
filetank FAULTED corrupted data
raidz1 FAULTED corrupted data
ada3 ONLINE
ada1 ONLINE
ada4 ONLINE
ada2 ONLINE
[root@media] ~# zpool import -f filetank
cannot import 'filetank': one or more devices is currently unavailable
奇怪的是,raidz 只显示它已损坏,我不知道该怎么办。我发现大多数东西都涉及更换单个设备,但看起来没有任何特定设备发生故障?我回到 FreeNas 7 并得到了相同的错误,这基本上是我所期望的。
答案1
尝试zpool import -f -F -n filetank
。
这实际上不会导入池,但会告诉您它是否可恢复。
如果批准,则继续:
zpool import -f -F filetank
这些选项的详细信息,来自手册页:
-f
Forces import, even if the pool appears to be poten-
tially active.
-F
Recovery mode for a non-importable pool. Attempt to
return the pool to an importable state by discarding
the last few transactions. Not all damaged pools can
be recovered by using this option. If successful,
the data from the discarded transactions is irre-
trievably lost. This option is ignored if the pool
is importable or already imported.
...
-n
Used with the -F recovery option. Determines whether
a non-importable pool can be made importable again,
but does not actually perform the pool recovery. For
more details about pool recovery mode, see the -F
option, above.
答案2
尝试使用其数字标识符 (id) 导入它。这通常会产生神奇的效果。
zpool import -f 17702465758427828599
您可能遇到了一个旧的 ZFS 导入错误,导致强制导入仅在通过 id 执行时才可行。请参阅此帖子评论中的解释。
如果这能解决问题我就很高兴了。
如果没有,您应该检查 zfs 日志,看看是否有关于校验和不匹配的抱怨。如果是这种情况,您可能希望查看 zdb -l /dev/dsk/ad* 告诉您有关磁盘的信息,因为这意味着元数据已损坏。