From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 8 13:29:07 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 8DE4416A4E0 for ; Fri, 8 Sep 2006 13:29:07 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.FreeBSD.org (Postfix) with SMTP id BA5F443D45 for ; Fri, 8 Sep 2006 13:29:06 +0000 (GMT) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 8851 invoked by uid 1001); 8 Sep 2006 13:29:01 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Fri, 08 Sep 2006 09:29:01 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17665.28700.948624.425733@bhuda.mired.org> Date: Fri, 8 Sep 2006 09:29:00 -0400 To: Vladimir Terziev In-Reply-To: <20060908100337.73c0c88d.vlady@gbservices.biz> References: <20060908100337.73c0c88d.vlady@gbservices.biz> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Mike Meyer 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:29:07 -0000 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. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.