How to destroy a zpool that can no longer be imported?

Johan Hendriks joh.hendriks at gmail.com
Mon Mar 10 08:00:24 UTC 2014


Jonathan Chen schreef:
> Hi,
>
> While experimenting ZFS, I've ended up with a zpool that can't be imported:
>
> 8:41pm# zpool import
>     pool: lake
>       id: 10528535549827216272
>    state: UNAVAIL
>   status: One or more devices are missing from the system.
>   action: The pool cannot be imported. Attach the missing
>          devices and try again.
>     see: http://illumos.org/msg/ZFS-8000-3C
>   config:
>
>          lake                    UNAVAIL  insufficient replicas
>            12490607842175990247  UNAVAIL  cannot open
>
> I don't care about the (non-existent) data, but I would like to remove
> the pool entry. The standard way is to import the pool and then
> destory it. However, this pool cannot be import (even with -f) and so
> there doesn't seem to be a way to destroy it.
>
> How do I get rid of this bogus faulted pool?

Try zpool labelclear, it will wipe the labels from the disk.

Be aware that zpool labelclear clears all labels like gimmor, gpart and 
not only zpool labels so you will end up with a clean disk !!!!

regards
Johan




More information about the freebsd-questions mailing list