Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Mar 2009 15:16:41 +0100
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to tear down a geom mirror?
Message-ID:  <gorb8u$9v2$1@ger.gmane.org>
In-Reply-To: <20090306140850.GA62926@stack.nl>
References:  <17738942.121236320716364.JavaMail.HALO$@halo>	<17349951.141236320867093.JavaMail.HALO$@halo> <20090306140850.GA62926@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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. 
> 
>> 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.

Or simply use the "clean" command, for example "gmirror clean" (also
supported in other GEOM classes).


[-- Attachment #2 --]
-----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-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gorb8u$9v2$1>