问题描述
我已将Ubuntu从13.04版本更新到13.10版本,只是发现SATA磁盘ID已更改,并且我的ZFS池现在出现故障。
在新的Ubuntu 13.10上,磁盘ID现在为ata- *而不是scsi-SATA_ *。
这是更新后的池状态:
pool: nestpool
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
nestpool UNAVAIL 0 0 0 insufficient replicas
raidz2-0 UNAVAIL 0 0 0 insufficient replicas
scsi-SATA_WDC_WD4000F9YZ-_WD-WCC1F0046946 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WCC4A0026423 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0011145 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0049294 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0051143 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0051756 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0056625 UNAVAIL 0 0 0
scsi-SATA_WDC_WD4000F9YZ-_WD-WMC1F0200560 UNAVAIL 0 0 0
logs
mirror-1 UNAVAIL 0 0 0 insufficient replicas
scsi-SATA_Samsung_SSD_840S1ATNEAD707062H-part2 UNAVAIL 0 0 0
scsi-SATA_Samsung_SSD_840S1ATNEAD707066K-part3 UNAVAIL 0 0 0
在对Internet进行了很长时间的研究之后,我开始执行以下步骤:
首先使用以下命令导出池:zpool export nestpool
然后尝试使用以下方法导入回池:zpool import -m -f -d /dev /disk /by-id nestpool
但是导入失败并显示以下消息:无法导入’nestpool’:一个或多个设备当前不可用
这是zpool import的当前输出
pool: nestpool
id: 3947768928242827823
state: DEGRADED
status: One or more devices contains corrupted data.
action: The pool can be imported despite missing or damaged devices. The
fault tolerance of the pool may be compromised if imported.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
config:
nestpool DEGRADED
raidz2-0 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WCC1F0046946 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WCC4A0026423 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0011145 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0049294 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0051143 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0051756 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0056625 ONLINE
ata-WDC_WD4000F9YZ-09N20L0_WD-WMC1F0200560 ONLINE
cache
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H-part1
logs
mirror-1 UNAVAIL insufficient replicas
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H UNAVAIL corrupted data
ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707066K UNAVAIL
未正确标识日志分区,它们应为ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707062H-part2和ata-Samsung_SSD_840_PRO_Series_S1ATNEAD707066K-part3。导入期间的参数-m没有帮助。
我找不到告诉zpool import为日志设备使用其他路径/id的方法。任何帮助和想法解决此问题将不胜感激。我还可以做什么来恢复该池?
最佳方法
请尝试zpool list
。这将显示该池是否可供系统使用。
尝试导入。也许是zpool import -f nestpool
也许尝试通过以下方式删除不可用的日志设备:
zpool remove nestpool mirror-1
从现在开始,将整个设备用于L2ARC和ZIL …
编辑:
最简单的解决方法是在/dev/disk/by-id
中临时创建所需的符号链接,以导入池。运行当前ZFS的RHEL系统的示例。
[root@Davalan /dev/disk/by-id]# ll
total 0
lrwxrwxrwx 1 root root 9 Oct 27 05:29 ata-STEC_M8IOPS-50_STM000136649 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct 27 05:29 ata-STEC_M8IOPS-50_STM000136649-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 ata-STEC_M8IOPS-50_STM000136649-part9 -> ../../sdc9
lrwxrwxrwx 1 root root 9 Oct 27 05:29 scsi-35000c5003af99fa7 -> ../../sdd
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000c5003af99fa7-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000c5003af99fa7-part9 -> ../../sdd9
lrwxrwxrwx 1 root root 9 Oct 27 05:29 scsi-35000cca0153ec2d0 -> ../../sdb
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca0153ec2d0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca0153ec2d0-part9 -> ../../sdb9
lrwxrwxrwx 1 root root 9 Oct 27 05:29 scsi-35000cca01540e298 -> ../../sdf
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca01540e298-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca01540e298-part9 -> ../../sdf9
lrwxrwxrwx 1 root root 9 Oct 27 05:29 scsi-35000cca01540e340 -> ../../sde
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca01540e340-part1 -> ../../sde1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-35000cca01540e340-part9 -> ../../sde9
lrwxrwxrwx 1 root root 9 Oct 27 05:29 scsi-SATA_STEC_M8IOPS-50_STM000136649 -> ../../sdc
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-SATA_STEC_M8IOPS-50_STM000136649-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Oct 27 05:29 scsi-SATA_STEC_M8IOPS-50_STM000136649-part9 -> ../../sdc9