From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:09:07 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79B731065675 for ; Fri, 6 Mar 2009 14:09:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5000::149]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0088FC32 for ; Fri, 6 Mar 2009 14:09:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id D8E863F863; Fri, 6 Mar 2009 15:09:05 +0100 (CET) X-Spam-DCC: : X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on meestal-mk5.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Relay-Country: Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 7B87A3F85E; Fri, 6 Mar 2009 15:09:03 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id CC71C22892; Fri, 6 Mar 2009 15:08:50 +0100 (CET) Date: Fri, 6 Mar 2009 15:08:50 +0100 From: Jilles Tjoelker To: Peter Steele Message-ID: <20090306140850.GA62926@stack.nl> References: <17738942.121236320716364.JavaMail.HALO$@halo> <17349951.141236320867093.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17349951.141236320867093.JavaMail.HALO$@halo> X-Operating-System: FreeBSD 7.1-PRERELEASE i386 User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to tear down a geom mirror? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 14:09:07 -0000 On Thu, Mar 05, 2009 at 10:27:50PM -0800, Peter Steele wrote: > I've created a USB boot disk that is used to clone itself onto the > systems hard drives, setting up mirrored file systems in the process. > The main difficulty I'm having is reimaging a system with an existing > OS whose drives are already configured in a mirror. I want of course > to destroy the mirror and create a complete new one, but I can't find > the right process to accomplish this reliably. I don't want to make > any assumptions about what mirrors might exist already and I > definitely don't want to do "gmirror load" before I get a chance to > destroy any existing mirrors. > What I am doing is to clean the drive using dd. For example, assume my > target system has two drives ad1 and ad2. I issue the following > commands: > dd if=/dev/zero of=/dev/ad1 bs=512 count=79 > dd if=/dev/zero of=/dev/ad2 bs=512 count=79 gmirror and various other geom modules store their metadata on the last sector(s) of the drive, so you need to wipe that too. -- Jilles Tjoelker