ZFS is there ZFS metadata that can be saved?

I'm wondering what is happening when one issues a command to destroy ZFS pool? is some metadata erased then? is something else happening under the hood that actually doesn't destroy the content on ZFS pool but only some specific metadata? is there a chance that ZFS uses metadata at specific areas on each disk belonging to pool and that metadata can be saved and restored in case of emergency?

I have no deep knowledge on the subject and I'm not sure if it makes sense at all. I just think by analogy, for example, with old fashioned ms-dos partitions. if one saves first 512 bytes of the disk and something happens to that area then it is possible to restore backup and eventually everything is as it was before: information about partitions is restored. is something like this possible for ZFS so that in case of overwriting one can restore metadata on block devices used in pool that got destroyed and try to recover whatever content can be recovered? is this analogy adequate or there is completely different story with no chances for success?

thank you,
geos
 
If nothing else has been written to the drives, you can recover the zpool with zpool import -Df -- see zpool(8) for details.

zpool destroy just marks them as destroyed, and doesn't do anything to prevent their re-import, at least to my understanding.
 
Although perhaps that's not what you were asking... There are uberblocks duplicated at the beginning and end of the disk, but saving them would be of little use "in the future" since they point off into the pool itself and hold little actual information and are very frequently updated (~5s) to point to the latest structures on disk.

See slide 4 here: http://www.osdevcon.org/2008/files/osdevcon2008-max.pdf

The (fixed location) uberblocks only give you that first box in the top left.
 
Dear Eric A. Borisch,
if I remember correctly zpool get has been mentioned in some documents. How far is this useful?

I'm not quite sure what you are asking. zpool get can show you the properties of the pool, but none of that information is of much use in terms of saving it "in case of emergency" as the original poster was looking for.
 
Back
Top