All,
Problem solved. I am writing this in case someone has the same
problem in the future trying to zpool import a pool without a log
device.
After debugging zfs-fuse a bit (printf and zfs-fuse -n are my
friends, I guess) to understand better where the problem was, I ended
up doing the following change (in libzpool/vdev.c):
/*
* If this is a top-level vdev, initialize its metaslabs.
*/
if (vd == vd->vdev_top && !vd->vdev_ishole &&
(vd->vdev_ashift == 0 || vd->vdev_asize == 0 ||
- vdev_metaslab_init(vd, 0) != 0))
- vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN,
- VDEV_AUX_CORRUPT_DATA);
+ vdev_metaslab_init(vd, 0) != 0)) {
+ printf("\nFound corrupted top level vdev.");
+ //vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN,
+ // VDEV_AUX_CORRUPT_DATA);
+ }
Basically I commented out the location that marked the state of the
log vdev as broken. With that done, the pool will zpool import -F
even without the log device, in an slightly odd state (missing was not
the name of the log device, this comes from VDEV_TYPE_MISSING):
root:~/ # zpool status igorhvr-data
pool: igorhvr-data
state: UNAVAIL
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'.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
igorhvr-data UNAVAIL 0 0
0 insufficient replicas
mirror-0 DEGRADED 0 0 0
disk/by-id/dm-name-igorhvr-data-0 ONLINE 0 0 0
disk/by-id/dm-name-igorhvr-data-1 OFFLINE 0 0 0
missing-1 ONLINE 0 0 0
cache
mapper/cache UNAVAIL 0 0
0 cannot open
errors: No known data errors
root:~/ # ls /igorhvr-data
aasylum dt fileList.txt floating-asylum ildata u wqasylum
www.iasylum.net
Still, despite the unavailable state, everything seems to be
working fine. In particular zfs send works well, so I was able to zfs
send my data to a sane place...
Regards,
--
igorhvr