Bob
2014-04-24 12:19:58 UTC
Hello All,
Here we have a corrupted zpool, which shows below:
***@openindiana:~# zpool import
pool: POOLSAS
id: 6657267340672818258
state: ONLINE
status: One or more devices were being resilvered.
action: The pool can be imported using its name or numeric identifier.
config:
POOLSAS ONLINE
raidz1-0 ONLINE
c2t5000C50068DE43B3d0 UNAVAIL corrupted data
c2t5000C50068DE4F63d0 UNAVAIL corrupted data
c2t5000C50068DE600Bd0 UNAVAIL corrupted data
c2t5000C50068E16F3Fd0 UNAVAIL corrupted data
c2t5000C50068E177B7d0 UNAVAIL corrupted data
c2t5000C50068E19A53d0 UNAVAIL corrupted data
c2t5000C50068E1DEE7d0 UNAVAIL corrupted data
c2t5000C50068E34F0Fd0 UNAVAIL corrupted data
raidz1-1 ONLINE
c2t5000C50068DE6957d0 ONLINE
c2t5000C50068E16983d0 ONLINE
c2t5000C50068E18C73d0 ONLINE
c2t5000C50068E1AF2Fd0 ONLINE
c2t5000C50068E1DB6Fd0 ONLINE
c2t5000C50068E1F8A7d0 ONLINE
c2t5000C50068E208EBd0 ONLINE
c2t5000C50068E266ABd0 ONLINE
raidz1-2 ONLINE
c2t5000C500688BAB87d0 UNAVAIL corrupted data
c2t5000C500688BB0CBd0 UNAVAIL corrupted data
spare-2 ONLINE
c2t5000C50068950F3Bd0 FAULTED corrupted data
c2t5000C500688B97BBd0 UNAVAIL corrupted data
c2t5000C500689AB39Bd0 UNAVAIL corrupted data
c2t5000C500689AB4A7d0 UNAVAIL corrupted data
c2t5000C50068A34BA3d0 UNAVAIL corrupted data
c2t5000C50068DEA203d0 UNAVAIL corrupted data
spare-7 ONLINE
c2t5000C5006B5C78B3d0 FAULTED corrupted data
c2t5000C50068E1EEE7d0 FAULTED corrupted data
raidz1-3 ONLINE
c2t5000C50068883F83d0 FAULTED corrupted data
spare-1 ONLINE
c2t5000C500688AEAB7d0 UNAVAIL corrupted data
c2t5000C50068E150ABd0 FAULTED corrupted data
spare-2 ONLINE
c2t5000C50068950F93d0 UNAVAIL corrupted data
c2t5000C500688B91B3d0 FAULTED corrupted data
c2t5000C50068951093d0 FAULTED corrupted data
c2t5000C5006898C36Fd0 FAULTED corrupted data
c2t5000C50068A181ABd0 FAULTED corrupted data
c2t5000C50068EFB347d0 FAULTED corrupted data
c2t5000C50068EFBC17d0 UNAVAIL corrupted data
cache
c2t5000A7203008D09Bd0
spares
c2t5000C500688B91B3d0
c2t5000C500688B97BBd0
c2t5000C50068E150ABd0
c2t5000C50068E1EEE7d0
logs
mirror-4 ONLINE
c2t5000A7203008D0A4d0 ONLINE
c2t5000A7203008D0A5d0 ONLINE
and with zpool import -f POOLSAS, we got the unhappy output:(,
***@openindiana:~# zpool import -f POOLSAS
cannot import 'POOLSAS': one or more devices is currently unavailable
OK, from what I googled, It seems we suffered a corrupted pool, like
many other guys met.
Well, I checked with zdb, the label seems 'OK', and after some trace
work(Thanks to Dtrace, really powerful and useful in this case if not
all the case),
I found that vdev_label_read_config return NULL,
which makes the vdev 'can't open'(or we can say dead?), and the later
story short, zio will be marked as ENXIO in zio_vdev_io_start:
if (vd->vdev_ops->vdev_op_leaf &&
(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE)) {
if (zio->io_type == ZIO_TYPE_READ && vdev_cache_read(zio) == 0)
return (ZIO_PIPELINE_CONTINUE);
if ((zio = vdev_queue_io(zio)) == NULL)
return (ZIO_PIPELINE_STOP);
if (!vdev_accessible(vd, zio)) {
zio->io_error = ENXIO;
zio_interrupt(zio);
return (ZIO_PIPELINE_STOP);
}
}
return (vd->vdev_ops->vdev_op_io_start(zio));
finally, We got ENXIO in spa_import->...->spa_load_impl, I guess it's
right here after vdev_load(which suffers ENXIO and vdev_dtl_load failed
right in space_map_load and
dmu_read->dmu_buf_hold_array_by_dnode->zio_wait(ENXIO set in
zio_vdev_io_start?)
in vdev_validate->vdev_label_read_config:
uint64_t txg = strict ? spa->spa_config_txg : -1ULL;
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL);
return (0);
}
I found that the spa->spa_config_txg is 0, which lead the
vdev_label_read_config return NULL,
So my question is:
1, does spa->spa_config_txg = 0 mean that the data corrupted?
2, Is there any solution to recover my data, I mean import the pool?
Thanks.
Here we have a corrupted zpool, which shows below:
***@openindiana:~# zpool import
pool: POOLSAS
id: 6657267340672818258
state: ONLINE
status: One or more devices were being resilvered.
action: The pool can be imported using its name or numeric identifier.
config:
POOLSAS ONLINE
raidz1-0 ONLINE
c2t5000C50068DE43B3d0 UNAVAIL corrupted data
c2t5000C50068DE4F63d0 UNAVAIL corrupted data
c2t5000C50068DE600Bd0 UNAVAIL corrupted data
c2t5000C50068E16F3Fd0 UNAVAIL corrupted data
c2t5000C50068E177B7d0 UNAVAIL corrupted data
c2t5000C50068E19A53d0 UNAVAIL corrupted data
c2t5000C50068E1DEE7d0 UNAVAIL corrupted data
c2t5000C50068E34F0Fd0 UNAVAIL corrupted data
raidz1-1 ONLINE
c2t5000C50068DE6957d0 ONLINE
c2t5000C50068E16983d0 ONLINE
c2t5000C50068E18C73d0 ONLINE
c2t5000C50068E1AF2Fd0 ONLINE
c2t5000C50068E1DB6Fd0 ONLINE
c2t5000C50068E1F8A7d0 ONLINE
c2t5000C50068E208EBd0 ONLINE
c2t5000C50068E266ABd0 ONLINE
raidz1-2 ONLINE
c2t5000C500688BAB87d0 UNAVAIL corrupted data
c2t5000C500688BB0CBd0 UNAVAIL corrupted data
spare-2 ONLINE
c2t5000C50068950F3Bd0 FAULTED corrupted data
c2t5000C500688B97BBd0 UNAVAIL corrupted data
c2t5000C500689AB39Bd0 UNAVAIL corrupted data
c2t5000C500689AB4A7d0 UNAVAIL corrupted data
c2t5000C50068A34BA3d0 UNAVAIL corrupted data
c2t5000C50068DEA203d0 UNAVAIL corrupted data
spare-7 ONLINE
c2t5000C5006B5C78B3d0 FAULTED corrupted data
c2t5000C50068E1EEE7d0 FAULTED corrupted data
raidz1-3 ONLINE
c2t5000C50068883F83d0 FAULTED corrupted data
spare-1 ONLINE
c2t5000C500688AEAB7d0 UNAVAIL corrupted data
c2t5000C50068E150ABd0 FAULTED corrupted data
spare-2 ONLINE
c2t5000C50068950F93d0 UNAVAIL corrupted data
c2t5000C500688B91B3d0 FAULTED corrupted data
c2t5000C50068951093d0 FAULTED corrupted data
c2t5000C5006898C36Fd0 FAULTED corrupted data
c2t5000C50068A181ABd0 FAULTED corrupted data
c2t5000C50068EFB347d0 FAULTED corrupted data
c2t5000C50068EFBC17d0 UNAVAIL corrupted data
cache
c2t5000A7203008D09Bd0
spares
c2t5000C500688B91B3d0
c2t5000C500688B97BBd0
c2t5000C50068E150ABd0
c2t5000C50068E1EEE7d0
logs
mirror-4 ONLINE
c2t5000A7203008D0A4d0 ONLINE
c2t5000A7203008D0A5d0 ONLINE
and with zpool import -f POOLSAS, we got the unhappy output:(,
***@openindiana:~# zpool import -f POOLSAS
cannot import 'POOLSAS': one or more devices is currently unavailable
OK, from what I googled, It seems we suffered a corrupted pool, like
many other guys met.
Well, I checked with zdb, the label seems 'OK', and after some trace
work(Thanks to Dtrace, really powerful and useful in this case if not
all the case),
I found that vdev_label_read_config return NULL,
which makes the vdev 'can't open'(or we can say dead?), and the later
story short, zio will be marked as ENXIO in zio_vdev_io_start:
if (vd->vdev_ops->vdev_op_leaf &&
(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE)) {
if (zio->io_type == ZIO_TYPE_READ && vdev_cache_read(zio) == 0)
return (ZIO_PIPELINE_CONTINUE);
if ((zio = vdev_queue_io(zio)) == NULL)
return (ZIO_PIPELINE_STOP);
if (!vdev_accessible(vd, zio)) {
zio->io_error = ENXIO;
zio_interrupt(zio);
return (ZIO_PIPELINE_STOP);
}
}
return (vd->vdev_ops->vdev_op_io_start(zio));
finally, We got ENXIO in spa_import->...->spa_load_impl, I guess it's
right here after vdev_load(which suffers ENXIO and vdev_dtl_load failed
right in space_map_load and
dmu_read->dmu_buf_hold_array_by_dnode->zio_wait(ENXIO set in
zio_vdev_io_start?)
in vdev_validate->vdev_label_read_config:
uint64_t txg = strict ? spa->spa_config_txg : -1ULL;
if ((label = vdev_label_read_config(vd, txg)) == NULL) {
vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
VDEV_AUX_BAD_LABEL);
return (0);
}
I found that the spa->spa_config_txg is 0, which lead the
vdev_label_read_config return NULL,
So my question is:
1, does spa->spa_config_txg = 0 mean that the data corrupted?
2, Is there any solution to recover my data, I mean import the pool?
Thanks.