# Does zpool destroy writes anything into failed disk?



## Mage (Sep 3, 2012)

Two days ago I installed the Gaming OS onto a disk of mine which had a ZFS pool on it. Even the label changed from GPT to MSDOS.

Today morning I booted FreeBSD and seen that I have a failed pool with 1+6 chechsum errors. No wonder. However, I was still sleepy and I typed: 


```
zpool destroy <the_pool_replaced_with_gaming_os>
```
Then I realized that I might have corrupted some bytes on the disk.

Does zpool destroy write any possible harmful bytes on the failed pool's disk or it just removes it from zpool cache?


----------



## Somari (Sep 4, 2012)

If nothing else has been done to the disks belonging to the zpool in question, then the following command should show up the pool,
`# zpool import -D`

The above lists destroyed pools only (as per the man page of zpool), and an import command following this stating the name of the pool should bring back your destroyed pool,
`# zpool import -D <poolname>`

I tested with a pool having only a single disk attached to it, I had the pool on a _glabel_ labeled disk, but the pool came back with the actual disk as seen from _zpool status_ command. So if you have multiple disks that are a part of this pool and are labeled or have something different than raw disks about them, then tread with a little care to ensure that the right disks are imported in this case (basically test on different disks before you possibly lose your data attempting this on your actual pool).


----------

