Chris's Wiki :: blog/solaris/ZFSPoolImportTwoStages Commentshttps://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSPoolImportTwoStages?atomcommentsDWiki2019-08-10T19:47:36ZRecent comments in Chris's Wiki :: blog/solaris/ZFSPoolImportTwoStages.By Maurice Volaski on /blog/solaris/ZFSPoolImportTwoStagestag:CSpace:blog/solaris/ZFSPoolImportTwoStages:5a46a58abadf58f5d885664bf2a4434c0bfc95aaMaurice Volaski<div class="wikitext"><p>Another example for you
<a href="https://zfsonlinux.topicbox.com/groups/zfs-discuss/T6737e97f63148254">https://zfsonlinux.topicbox.com/groups/zfs-discuss/T6737e97f63148254</a></p>
</div>2019-08-10T19:47:36ZBy Josef "Jeff" Sipek on /blog/solaris/ZFSPoolImportTwoStagestag:CSpace:blog/solaris/ZFSPoolImportTwoStages:12a9c5f6ffb4d359c6c7f2f5011c39daef60ce4aJosef "Jeff" Sipekhttps://blahg.josefsipek.net<div class="wikitext"><p>It's been a while since I looked into ZFS details, but from what I remember getting the config from a vdev is easy. Unless I'm misremembering, the pool config is stored in the vdev labels - not inside the MOS. And reading the label is pretty simple - just open the potential vdev, get the size, and read the 4 labels at the fixed offsets. Then, parse the config with libnvpair.</p>
<p>Of course getting the config from one vdev isn't quite enough. During the pool reassembly process, the configs from each vdev need to be "merged" and updated - disks can move around, and disks that used to be offline/inaccessible may have become online/accessible again.</p>
</div>2019-07-24T12:55:01Z