Re: (ZFS) zpool replace weirdness

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Tue, 24 Jul 2007 17:36:39 +0200
On Mon, Jul 23, 2007 at 11:17:53PM +0200, Sverre Svenningsen wrote:
> I've been playing around with zfs for a bit, and ran into a problem
> where i corrupted an entire drive (on purpose) by way of dd
> if=/dev/urandom of=/dev/ad12 .. as expected, the zpool noticed:
> 
> su-2.05b# zpool status
>   pool: array1
>  state: ONLINE
> status: One or more devices could not be used because the label is missing or
>         invalid.  Sufficient replicas exist for the pool to continue
>         functioning in a degraded state.
> action: Replace the device using 'zpool replace'.
>    see: http://www.sun.com/msg/ZFS-8000-4J
>  scrub: resilver completed with 0 errors on Mon Jul 23 23:05:53 2007
> config:
> 
>         NAME        STATE     READ WRITE CKSUM
>         array1      ONLINE       0     0     0
>           raidz1    ONLINE       0     0     0
>             ad10    ONLINE       0     0     0
>             ad12    UNAVAIL      0     0     0  corrupted data
>             ad14    ONLINE       0     0     0
>             ad16    ONLINE       0     0     0
>           raidz1    ONLINE       0     0     0
>             ad18    ONLINE       0     0     0
>             ad20    ONLINE       0     0     0
>             ad22    ONLINE       0     0     0
>             ad24    ONLINE       0     0     0
> 
> errors: No known data errors
> 
> 
> now i want to resilver that disk, but the problem is this:
> 
> su-2.05b# zpool replace -f array1 ad12
> invalid vdev specification
> the following errors must be manually repaired:
> ad12 is in use (r1w1e1)
> 
> but nothing is using that disk as far as i can tell! has anyone
> successfully done this?

It just works here, but the version I'm using is not yet committed,
maybe there was a fix in OpenSolaris.
You could try removing /boot/zfs/zpool.cache.

> would it be better to use slices instead of whole disks for zfs on
> freebsd? i want to get some experience with this so that i know
> what not to do when a disk breaks for real :)

Whole disks are fine.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Tue Jul 24 2007 - 13:37:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC