Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2009 15:08:50 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Peter Steele <psteele@maxiscale.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to tear down a geom mirror?
Message-ID:  <20090306140850.GA62926@stack.nl>
In-Reply-To: <17349951.141236320867093.JavaMail.HALO$@halo>
References:  <17738942.121236320716364.JavaMail.HALO$@halo> <17349951.141236320867093.JavaMail.HALO$@halo>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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