<div dir="ltr">Thanks Richard and Matthew.<div><br></div><div>After applying fix forĀ <a href="https://www.illumos.org/issues/5770">https://www.illumos.org/issues/5770</a>, I was able to run zdb and zpool import with -X, -F, -T and etc. But unfortunately I am no luck to successfully import the zpool. -F or -T returned "cannot import 'zp13': one or more devices is currently unavailable" (which seems to fail at the following code block), -X seems to run forever so I just killed it.</div><div><br></div><div><div><span class="" style="white-space:pre">        </span>/*</div><div><span class="" style="white-space:pre"> </span> * Find the best uberblock.</div><div><span class="" style="white-space:pre">        </span> */</div><div><span class="" style="white-space:pre">        </span>vdev_uberblock_load(rvd, ub, &label);</div><div><br></div><div><span class="" style="white-space:pre"> </span>/*</div><div><span class="" style="white-space:pre"> </span> * If we weren't able to find a single valid uberblock, return failure.</div><div><span class="" style="white-space:pre">        </span> */</div><div><span class="" style="white-space:pre">        </span>if (ub->ub_txg == 0) {</div><div><span class="" style="white-space:pre">          </span>nvlist_free(label);</div><div><span class="" style="white-space:pre">                </span>return (spa_vdev_err(rvd, VDEV_AUX_CORRUPT_DATA, ENXIO));</div><div><span class="" style="white-space:pre">  </span>}</div></div><div><br></div><div>Fortunately we had backup of the zpool available so we just restored from the backup.</div><div><br></div><div>Thanks again for the tips which may be useful in the future (I hope we will not make such mistake again).</div><div><br></div><div>-Youzhong</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 25, 2016 at 3:50 PM, Youzhong Yang <span dir="ltr"><<a href="mailto:youzhong@gmail.com" target="_blank">youzhong@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>Just wondering if anyone has done similar recovery using txg stuff.</div><div><br></div><div>We have a zpool attached to two hosts physically, ideally at any time only one host imports this zpool. Due to some operational mistake this zpool was corrupted when the two hosts tried to have access to it. Here is the crash stack:</div><br><div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 403854 kern.notice] assertion failed: 0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db), file: ../../common/fs/zfs/spa.c, line: 1549</div><div>Jan 25 10:07:17 batfs0346 unix: [ID 100000 kern.notice]</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 802836 kern.notice] ffffff017495c920 fffffffffba6b1f8 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495c9a0 zfs:load_nvlist+e8 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495ca90 zfs:spa_load_impl+10bb ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cb30 zfs:spa_load+14e ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cb80 zfs:spa_tryimport+aa ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cbd0 zfs:zfs_ioc_pool_tryimport+51 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cc80 zfs:zfsdev_ioctl+4a7 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495ccc0 genunix:cdev_ioctl+39 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cd10 specfs:spec_ioctl+60 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cda0 genunix:fop_ioctl+55 ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cec0 genunix:ioctl+9b ()</div><div>Jan 25 10:07:17 batfs0346 genunix: [ID 655072 kern.notice] ffffff017495cf10 unix:brand_sys_sysenter+1c9 ()</div></div><div><br></div><div>Is it possible to roll back the zpool to its last known good txg? We know when the zpool should be in good state.</div><div><br></div><div>Any suggestion would be very much appreciated. We can build a kernel if needed.</div><div><br></div><div>Thanks,</div><div><br></div><div>- Youzhong</div><div><br></div></div>
</blockquote></div><br></div>