From owner-freebsd-current@FreeBSD.ORG Tue Jul 24 05:42:51 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE04916A419 for ; Tue, 24 Jul 2007 05:42:51 +0000 (UTC) (envelope-from n-butcher=freebsd-current=freebsd.org=sbibybnr@fusiongol.com) Received: from smtp02.dentaku.gol.com (smtp02.dentaku.gol.com [203.216.5.72]) by mx1.freebsd.org (Postfix) with ESMTP id 8165013C428 for ; Tue, 24 Jul 2007 05:42:51 +0000 (UTC) (envelope-from n-butcher=freebsd-current=freebsd.org=sbibybnr@fusiongol.com) Received: from pat.gol.co.jp ([203.216.1.191] helo=[127.0.0.1]) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1IDDAY-0005ox-Dx for ; Tue, 24 Jul 2007 14:42:50 +0900 Message-ID: <46A59157.1040204@fusiongol.com> Date: Tue, 24 Jul 2007 14:42:47 +0900 From: Nathan Butcher User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: freebsd-current@freebsd.org X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GOL X-Abuse-Complaints: abuse@gol.com Subject: Re: (ZFS) zpool replace weirdness X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 05:42:51 -0000 >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.