Eu tenho um raidz vdev com 3 discos. Disk0 agora falhou e eu tentei recuperar, no entanto, não posso executar zpool import
. Disk0 ainda está funcionando, mas a tabela de partições está corrompida e eu tentei reconstruí-la.
$ zpool import
pool: epool
id: 15752543265619539307
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:
epool FAULTED corrupted data
raidz1-0 DEGRADED
ata-WDC_WD30EZRX-00D8PB0_WD-WMC4N1642572-part1 UNAVAIL corrupted data
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N1KPRKPX-part1 ONLINE
ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7ZXC1E0-part1 ONLINE
Existe alguma possibilidade de reparar esta configuração?
$ zdb -l /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N1KPRKPX-part1
------------------------------------
LABEL 0
------------------------------------
version: 5000
name: 'epool'
state: 0
txg: 108340
pool_guid: 157525$43265619539307
errata: 0
hostname: 'eiselekd-lnx'
top_guid: 5366409938038884073
guid: 3063814570901399057
vdev_children: 1
vdev_tree:
type: 'raidz'
id: 0
guid: 5366409938038884073
nparity: 1
metaslab_array: 35
metaslab_shift: 36
ashift: 12
asize: 9001706717184
is_log: 0
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 9231358437407247535
path: '/dev/disk/by-id/ata-WDC_WD30EZRX-00D8PB0_WD-WMC4N1642572-part1'
whole_disk: 0
create_txg: 4
children[1]:
type: 'disk'
id: 1
guid: 3063814570901399057
path: '/dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N1KPRKPX-part1'
whole_disk: 0
DTL: 136
create_txg: 4
children[2]:/dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7ZXC1E0-part1
type: 'disk'
id: 2
guid: 10884448206527621454
path: '/dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N7ZXC1E0-part1'
whole_disk: 0
create_txg: 4
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
labels = 0 1 2 3
Na partição com falha, não há rótulos mostrados:
# zdb -l /dev/disk/by-id/ata-WDC_WD30EZRX-00D8PB0_WD-WMC4N1642572-part1
--------------------------------------------
LABEL 0
--------------------------------------------
failed to unpack label 0
--------------------------------------------
LABEL 1
--------------------------------------------
failed to unpack label 1
--------------------------------------------
LABEL 2
--------------------------------------------
failed to unpack label 2
--------------------------------------------
LABEL 3
--------------------------------------------
failed to unpack label 3
no entanto existem Ueberblocks (mágica 0cb1ba00 encontrada no começo e no fim da partição): Eu usei zfs_revert-0.1.py ( link ) veja também as informações do txg para o disk0 e algo no disco0 parece estar lá.
TXG TIME TIMESTAMP BLOCK ADDRESSES
108173 08 Feb 2018 02:24:11 1518053051 [360, 872, 5860494696, 5860495208]
108193 08 Feb 2018 02:25:59 1518053159 [264, 776, 5860494600, 5860495112]
108199 08 Feb 2018 02:26:30 1518053190 [312, 824, 5860494648, 5860495160]
108219 07 Mar 2018 16:44:43 1520437483 [472, 984, 5860494808, 5860495320]
108307 08 Mar 2018 15:58:41 1520521121 [408, 920, 5860494744, 5860495256]
108313 09 Mar 2018 14:25:03 1520601903 [456, 968, 5860494792, 5860495304]
108319 12 Mar 2018 17:33:00 1520872380 [504, 1016, 5860494840, 5860495352]
108325 14 Mar 2018 19:23:31 1521051811 [296, 808, 5860494632, 5860495144]
108331 15 Mar 2018 14:36:25 1521120985 [344, 856, 5860494680, 5860495192]
108337 15 Mar 2018 20:07:58 1521140878 [392, 904, 5860494728, 5860495240]
Então, acho que talvez o particionamento tenha desviado o início da partição.
Não shure. Eu fiz um dd if=/dev/sda | strings | grep WCC4N1KPRKPX-part1
no entanto a informação do rótulo do disco não está lá ...
É possível substituir a-WDC_WD30EZRX-00D8PB0_WD-WMC4N1642572-part1 por um novo disco e resilver? O link link na saída de importação do zfs não me dá esperança, mas ainda assim ....