From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 8 13:55:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DD4B16A4DF for ; Fri, 8 Sep 2006 13:55:43 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from cat.gbservices.biz (cat-mtl.gbservices.biz [213.226.50.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E468443D45 for ; Fri, 8 Sep 2006 13:55:42 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 5C6BA2EDAE3; Fri, 8 Sep 2006 15:55:44 +0200 (CEST) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by cat.gbservices.biz (Postfix) with ESMTP id EF8AB2EDAD8; Fri, 8 Sep 2006 15:55:43 +0200 (CEST) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id BF4A028504; Fri, 8 Sep 2006 15:55:38 +0200 (CEST) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 7D3BF28503; Fri, 8 Sep 2006 15:55:38 +0200 (CEST) Date: Fri, 8 Sep 2006 16:55:38 +0300 From: Vladimir Terziev To: Mike Meyer Message-Id: <20060908165538.39464459.vlady@gbservices.biz> In-Reply-To: <17665.28700.948624.425733@bhuda.mired.org> References: <20060908100337.73c0c88d.vlady@gbservices.biz> <17665.28700.948624.425733@bhuda.mired.org> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-C Cc: freebsd-hackers@freebsd.org Subject: Re: Mirroring the root disk of already installed machine 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, 08 Sep 2006 13:55:43 -0000 Thanks Mike, i've read this http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html article before, but was in doubt whether i could use instructions in it. Now, after your hint about single user mode, i'm sure it will help me in 100%. Best regards! Vlady On Fri, 8 Sep 2006 09:29:00 -0400 Mike Meyer wrote: > In <20060908100337.73c0c88d.vlady@gbservices.biz>, Vladimir Terziev typed: > > i have a machine running FreeBSD 5.4 . It has 2 HDDs. Recently the non-root HDD failed and lost all the data on it. Since the machine is working 24/7 i want to mirror its root disk (this one with the OS on it) in order to prevent a severe downtime and data loss. > > > > Is there a safe way to do the above using gmirror ? > > Yes. I started doing it on FreeBSD 5.5. It's pretty simple: shut down > to single user. Create a mirror with your root disk in it. Edit > /etc/hosts to change the device name from ad* to > mirror/*. Reboot. Once you're back up, add the second disk to the > mirror. If you want exact instructions, consult google. The tricky > part is creating the initial mirror on a mounted file system - you > have to toggle a sysctl (I think that's what it was) to do that. Some > directions include that; others recommend you boot on a recovery CD to > create the mirror initially. > > BTW, this probably should have gone to -questions. > > -- > Mike Meyer http://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more information.