Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2013 16:13:53 +0200
From:      Adam Nowacki <nowakpl@platinum.linux.pl>
To:        freebsd-fs@freebsd.org
Subject:   Re: How do we clear a bogus zpool?
Message-ID:  <5214CB21.8080206@platinum.linux.pl>
In-Reply-To: <1377026509.1478.3.camel@localhost>
References:  <1377015858.1450.3.camel@localhost> <CAOaKuAVuJXf-Ceuh0Z4ToLtCc2D%2BBTVEabcVNWK=vktKjqoQcQ@mail.gmail.com> <1377026509.1478.3.camel@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-08-20 21:21, Sean Bruno wrote:
> On Tue, 2013-08-20 at 20:28 +0200, Johan Hendriks wrote:
>>          # zpool import
>>             pool: zroot
>>               id: 854190767471294680
>>            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:
>>
>>                  zroot                     UNAVAIL  insufficient
>>          replicas
>>                    raidz1-0                UNAVAIL  insufficient
>>          replicas
>>                      17925463268209287656  UNAVAIL  cannot open
>>                      11020448220822113890  UNAVAIL  corrupted data
>>                      10143858893287711942  UNAVAIL  corrupted data
>>                      7542790596970715955   UNAVAIL  corrupted data
>>                      10811885036534933813  UNAVAIL  corrupted data
>>                      13343774937261906429  UNAVAIL  corrupted data
>>
>>          # zpool destroy -f zroot
>>          cannot open 'zroot': no such pool
>>          # zpool clear -F zroot
>>          cannot open 'zroot': no such pool
>>
>>
>>          Sean
>>
>>
>>
>> There is a label clear option for zpool # zpool labelclear devicename
>> It will wipe ALL labels, and not only zpool/zfs labels.
>
>
> Sure, but which device to pass in as an argument?  I'm not sure where
> the zpool information is even coming from.
>

sysctl -b kern.geom.conftxt | sh -c 'while read a b c d; do zdb -l 
/dev/$c | grep -q version && echo $c; done'

This should list all devices with zfs labels.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5214CB21.8080206>