![ZFS 池磁盘出现故障。已脱机并被替换,现在我陷入困境](https://linux22.com/image/768070/ZFS%20%E6%B1%A0%E7%A3%81%E7%9B%98%E5%87%BA%E7%8E%B0%E6%95%85%E9%9A%9C%E3%80%82%E5%B7%B2%E8%84%B1%E6%9C%BA%E5%B9%B6%E8%A2%AB%E6%9B%BF%E6%8D%A2%EF%BC%8C%E7%8E%B0%E5%9C%A8%E6%88%91%E9%99%B7%E5%85%A5%E5%9B%B0%E5%A2%83.png)
原始故障:
pool: datastore7
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
scan: resilvered 72K in 0 days 00:00:00 with 0 errors on Tue Feb 2 14:12:50 2021
config:
NAME STATE READ WRITE CKSUM
datastore7 DEGRADED 0 0 0
raidz2-0 DEGRADED 0 0 0
ata-ST12000NM001G-2MV103_ZLW1MN17 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1QTC1 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL26MYHM ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL269WB4 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1LH4W ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1NS9P ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1EZ91 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1M9F9 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1NHRW ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1MX0Z ONLINE 0 0 0
11549522135666300014 FAULTED 0 0 0 was /dev/sdbe1
ata-ST12000NM001G-2MV103_ZLW1MVV5 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW0C5E5 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL2791Y8 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1F68Y ONLINE 0 0 0
我离线了该驱动器,并在插槽中替换了一个新的驱动器。
不,我的状态看起来像这样......
pool: datastore7
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using 'zpool online' or replace the device with
'zpool replace'.
scan: resilvered 0B in 0 days 00:00:00 with 0 errors on Tue Jun 29 14:49:39 2021
config:
NAME STATE READ WRITE CKSUM
datastore7 DEGRADED 0 0 0
raidz2-0 DEGRADED 0 0 0
ata-ST12000NM001G-2MV103_ZLW1MN17 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1QTC1 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL26MYHM ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL269WB4 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1LH4W ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1NS9P ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1EZ91 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1M9F9 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1NHRW ONLINE 0 0 0
13954818631282842372 OFFLINE 0 0 0 was /dev/disk/by-id/ata-ST12000NM001G-2MV103_ZLW1MX0Z-part1
sdbe ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1MVV5 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW0C5E5 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZL2791Y8 ONLINE 0 0 0
ata-ST12000NM001G-2MV103_ZLW1F68Y ONLINE 0 0 0
所有替换命令似乎都出现错误:
-bash-4.2$ sudo zpool replace datastore7 13954818631282842372 sdbe
[sudo] password for ash.hill:
/dev/sdbe is in use and contains a unknown filesystem.
很想得到一些指导,因为我对 zfs 还很陌生。幸运的是,这个卷上还没有数据,但我还是想知道如何恢复。
谢谢!