![zpool replace 已成功运行,但仍建议使用 zpool replace。它告诉我什么?](https://linux22.com/image/743028/zpool%20replace%20%E5%B7%B2%E6%88%90%E5%8A%9F%E8%BF%90%E8%A1%8C%EF%BC%8C%E4%BD%86%E4%BB%8D%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8%20zpool%20replace%E3%80%82%E5%AE%83%E5%91%8A%E8%AF%89%E6%88%91%E4%BB%80%E4%B9%88%EF%BC%9F.png)
raidz3 中的一个驱动器出现故障(pci-0000:03:00.0-scsi-0:0:10:0
),我用一个可用的备用驱动器(wwn-0x5000c500858252ef)替换了它:
pool: darkpool
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
scan: resilvered 3.16T in 137h44m with 0 errors on Mon Sep 23 16:07:06 2019
config:
NAME STATE READ WRITE CKSUM
darkpool DEGRADED 0 0 0
raidz3-0 DEGRADED 0 0 0
wwn-0x5000c5008581aafb ONLINE 0 0 0
wwn-0x5000c5008581b61b ONLINE 0 0 0
sdm ONLINE 0 0 0
sdj ONLINE 0 0 0
wwn-0x5000c5008581b953 ONLINE 0 0 0
wwn-0x5000c5008581bdf7 ONLINE 0 0 0
wwn-0x5000c50085825ec7 ONLINE 0 0 0
sdg ONLINE 0 0 0
wwn-0x5000c5008581e423 ONLINE 0 0 0
wwn-0x5000c5008581fd3f ONLINE 0 0 0
wwn-0x5000c50085820b93 ONLINE 0 0 0
wwn-0x5000c500858211b3 ONLINE 0 0 0
wwn-0x5000cca267ab0de4 ONLINE 0 0 0
spare-13 DEGRADED 0 0 0
pci-0000:03:00.0-scsi-0:0:10:0 FAULTED 0 69 0 too many errors
wwn-0x5000c500858252ef ONLINE 0 0 0
spares
wwn-0x5000c500858252ef INUSE currently in use
我以为备用驱动器在重新镀银后会消失,并成为池中的一员。但这种DEGRADED
状态仍然存在,备用驱动器仍在INUSE
填补故障驱动器的空缺。
建议是replace the faulted device, or use use 'zpool clear' to mark the device as repaired.
我完全误解了这clear
句话的意思。这是我的错误。我觉得我只是让事情变得更糟了。
pool: darkpool
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: scrub in progress since Mon Sep 23 17:12:17 2019
6.18T scanned out of 46.4T at 162M/s, 72h16m to go
0B repaired, 13.31% done
config:
NAME STATE READ WRITE CKSUM
darkpool DEGRADED 0 0 0
raidz3-0 DEGRADED 0 0 0
wwn-0x5000c5008581aafb ONLINE 0 0 0
wwn-0x5000c5008581b61b ONLINE 0 0 0
sdm ONLINE 0 0 0
sdj ONLINE 0 0 0
wwn-0x5000c5008581b953 ONLINE 0 0 0
wwn-0x5000c5008581bdf7 ONLINE 0 0 0
wwn-0x5000c50085825ec7 ONLINE 0 0 0
sdg ONLINE 0 0 0
wwn-0x5000c5008581e423 ONLINE 0 0 0
wwn-0x5000c5008581fd3f ONLINE 0 0 0
wwn-0x5000c50085820b93 ONLINE 0 0 0
wwn-0x5000c500858211b3 ONLINE 0 0 0
wwn-0x5000cca267ab0de4 ONLINE 0 0 0
spare-13 DEGRADED 0 0 0
pci-0000:03:00.0-scsi-0:0:10:0 FAULTED 0 0 0 corrupted data
wwn-0x5000c500858252ef ONLINE 0 0 0
spares
wwn-0x5000c500858252ef INUSE currently in use
errors: No known data errors
我在最后一个空闲插槽中添加了另一个驱动器,wnn-0x5000cca26788a8f8
但是我应该在这里替换什么呢?
输出lsscsi
:
[0:0:2:0] disk SEAGATE ST8000NM0075 PS24 0x5000c500858211b3 /dev/sda
[0:0:3:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581b953 /dev/sdb
[0:0:4:0] disk SEAGATE ST8000NM0075 PS24 0x5000c50085825ec7 /dev/sdc
[0:0:5:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581e423 /dev/sdd
[0:0:6:0] disk HGST HUH721008AL5205 D384 0x5000cca26788a8f8 /dev/sdq
[0:0:7:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581b61b /dev/sde
[0:0:8:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581aafb /dev/sdf
[0:0:9:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581cc03 /dev/sdg
[0:0:10:0] disk HGST HUH721008AL5205 D384 0x5000cca267ab0de4 /dev/sdh
[0:0:11:0] disk SEAGATE ST8000NM0075 PS24 0x5000c50085823d2b /dev/sdi
[0:0:12:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581b933 /dev/sdj
[0:0:13:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581bdf7 /dev/sdk
[0:0:14:0] disk SEAGATE ST8000NM0075 PS24 0x5000c50085820b93 /dev/sdl
[0:0:15:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581b79f /dev/sdm
[0:0:16:0] disk SEAGATE ST8000NM0075 PS24 0x5000c500858252ef /dev/sdn
[0:0:17:0] disk SEAGATE ST8000NM0075 PS24 0x5000c5008581fd3f /dev/sdo
[0:2:0:0] disk DELL PERC H330 Adp 4.27 0x61866da05f3bc2001f1c1a0d117e72cf /dev/sdp
[10:0:0:0] cd/dvd HL-DT-ST DVD+-RW GHB0N A1C0 0x5001480000000000 /dev/sr0
sudo zfs get version darkpool
NAME PROPERTY VALUE SOURCE
darkpool version 5 -
我相信该池是在 Ubuntu 14.04 上创建的
History for 'darkpool':
2016-07-15.10:38:13 [txg:5] create pool version 5000; software version 5000/5; uts hippocampus 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64
不,我不知道是谁设置了这些名字,我更喜欢 by-id,尽管在 Ubuntu 18 中它似乎不再重要了。
答案1
您可能过早地清除了 zpool 错误(重新镀银正在进行中)但是,您不应该对池健康造成任何损害。
让您的池重新镀银,然后发出zpool clear darkpool
并最终执行zpool scrub darkpool
。这应该足以拥有一个干净的池。