Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2007 14:42:47 +0900
From:      Nathan Butcher <n-butcher@fusiongol.com>
To:        freebsd-current@freebsd.org
Subject:   Re: (ZFS) zpool replace weirdness
Message-ID:  <46A59157.1040204@fusiongol.com>

index | next in thread | raw e-mail

>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:

I managed to do something similar, just not exactly the way you described.

For starters, I was unable to dd if=/dev/urandom of=/dev/ad3 because dd
prevented writing to the device in the zpool. What I did was to "zpool
export" my pool, THEN dd over the top of one of my devices. THEN "zpool
import" my pool again. The result was a fantastic error:-

  pool: z
 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 Jun 11 22:09:22 2007
config:

	NAME                     STATE     READ WRITE CKSUM
	z                        ONLINE       0     0     0
	  raidz1                 ONLINE       0     0     0
	    ad1                  ONLINE       0     0     0
	    4239271840293300479  UNAVAIL      0     0     0  was /dev/ad3
	    da0                  ONLINE       0     0     0
	    da1                  ONLINE       0     0     0

errors: No known data errors


Now I'm not sure how to recover the zpool. I can't exactly remove this
wonderful numerical device without a "ad3 is in use" error.

NB: that I'm running this ZFS on a 32-bit virtual machine with FreeBSD
i386 and 768MB memory. No idea if the problem replicates on amd64 with
over 1GB memory.



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46A59157.1040204>