从 12.04 迁移到 14.04 时我丢失了 zfs 池。
> sudo zpool status
pool: srv
state: UNAVAIL
status: One or more devices could not be used because the label is missing
or invalid. There are insufficient replicas for the pool to continue
functioning.
action: Destroy and re-create the pool from
a backup source.
see: http://zfsonlinux.org/msg/ZFS-8000-5E
scan: none requested
config:
NAME STATE READ WRITE CKSUM
srv UNAVAIL 0 0 0 insufficient replicas
raidz1-0 UNAVAIL 0 0 0 insufficient replicas
scsi-SATA_SAMSUNG_HD103SJS246J9BZ600265-part1 UNAVAIL 0 0 0
scsi-SATA_SAMSUNG_HD501LJS0MUJ2MP805571-part1 UNAVAIL 0 0 0
scsi-SATA_Maxtor_6H500F0_H80H5RYH-part1 UNAVAIL 0 0 0
> sudo zpool export srv
> sudo zpool import -d /dev/disk/by-id/ srv -f
cannot import 'srv': I/O error
Destroy and re-create the pool from
a backup source.
> sudo zpool import -d /dev
pool: srv
id: 8340478577715532614
state: FAULTED
status: One or more devices contains corrupted data.
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://zfsonlinux.org/msg/ZFS-8000-5E
config:
srv FAULTED corrupted data
raidz1-0 ONLINE
sdb1 ONLINE
sdc UNAVAIL corrupted data
sdd UNAVAIL corrupted data
我不知道现在该怎么办。能不能以某种方式修复它?是不是因为 zpool 试图使用整个磁盘而不是第一个分区?
答案1
要将任何类型的 ZFS 池导入系统,请使用:
sudo zfs import srv
它可能会失败,在这种情况下您应该使用 -f 选项:
sudo zfs import -f srv
不需要告诉 ZFS 设备名称,只需告诉池名称。
如果磁盘上有足够的数据,则会自动发现并导入池。
我认为您没有丢失数据,可能是 ZFS 的内核模块需要更新。
我建议您从 Linux 存储库上的 ZFS 中删除并再次安装 ZFS。