From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 6 14:17:16 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 6F32E106566B for ; Fri, 6 Mar 2009 14:17:16 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id EBACD8FC13 for ; Fri, 6 Mar 2009 14:17:15 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LfarO-00009T-W0 for freebsd-hackers@freebsd.org; Fri, 06 Mar 2009 14:17:11 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:17:10 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Mar 2009 14:17:10 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 06 Mar 2009 15:16:41 +0100 Lines: 48 Message-ID: References: <17738942.121236320716364.JavaMail.HALO$@halo> <17349951.141236320867093.JavaMail.HALO$@halo> <20090306140850.GA62926@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig258B2E1CE3BBC39D26872A0C" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.19 (X11/20090105) In-Reply-To: <20090306140850.GA62926@stack.nl> X-Enigmail-Version: 0.95.0 Sender: news 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:17:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig258B2E1CE3BBC39D26872A0C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jilles Tjoelker wrote: > 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.=20 >=20 >> 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:=20 >=20 >> dd if=3D/dev/zero of=3D/dev/ad1 bs=3D512 count=3D79=20 >> dd if=3D/dev/zero of=3D/dev/ad2 bs=3D512 count=3D79=20 >=20 > gmirror and various other geom modules store their metadata on the last= > sector(s) of the drive, so you need to wipe that too. Or simply use the "clean" command, for example "gmirror clean" (also supported in other GEOM classes). --------------enig258B2E1CE3BBC39D26872A0C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJsTBQldnAQVacBcgRAqzXAJ92e0UPnKhK6chYE7fCgfdOWJ5/cwCgjuF5 7bCmyILdvVH/oI4rDmval88= =hz3t -----END PGP SIGNATURE----- --------------enig258B2E1CE3BBC39D26872A0C--