Stale zpool from a prior life in "zpool import"

Chris Stankevitz chris at
Wed Feb 15 06:11:38 UTC 2017

On 2/14/17 12:45 PM, Chris Stankevitz wrote:
> How do I remove the UNAVAIL zpool?

Here's how I solved this:

1. use "zdb -l /device" on my devices to figure out which ones held 
references to these ghost zpools.  I had to call this on my raw disks, 
the partitions, and the decrypted .eli devices to catch them all

2. for each of the devices discovered with ghost zpool data, I ran 
"zpool labelclear -f /device".  Unfortunately this destroyed the geli 
metadata.  grrr.

3. I was careful about the order in which I called labelclear so that if 
devices were destroyed (which they were) a resilver would have brought 
my pool back.  However, the geli folks backed up the metadata to 
/var/backups during init.  I used "geli restore /var/backups/foo.eli 
/dev/gpt/foo" on the affected partitions to restore the encrypted 
partitions.  I wonder what else "zpool labelclear" could have destroyed 


More information about the freebsd-questions mailing list