I'm trying to fix a broken zpool due to losing the ZIL SSD device. I found this code fragment that looks like it would work around the problem and allow me to import the pool without the log device:
Two questions:
1. How can I get access to the source repository so I can apply this change?
2. Can I make vdev as a standalone binary, or is FreeNAS monolithic requiring a full build?
Thanks in advance!
Code:
/* * 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):
Two questions:
1. How can I get access to the source repository so I can apply this change?
2. Can I make vdev as a standalone binary, or is FreeNAS monolithic requiring a full build?
Thanks in advance!