From owner-freebsd-questions@FreeBSD.ORG Sat Mar 20 15:32:50 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5E70106575F for ; Sat, 20 Mar 2010 15:32:50 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from relay.pcl-ipout01.plus.net (relay.pcl-ipout01.plus.net [212.159.7.99]) by mx1.freebsd.org (Postfix) with ESMTP id 622B08FC13 for ; Sat, 20 Mar 2010 15:32:50 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAE6HpEvUnw4U/2dsb2JhbACbPnO9KoR9BA Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.pcl-ipout01.plus.net with ESMTP; 20 Mar 2010 15:32:49 +0000 Received: from [84.92.153.232] (helo=curlew.milibyte.co.uk) by pih-relay08.plus.net with esmtp (Exim) id 1Nt0fR-0003dR-6k for freebsd-questions@freebsd.org; Sat, 20 Mar 2010 15:32:49 +0000 Received: by curlew.milibyte.co.uk with local (Exim 4.71) (envelope-from ) id 1Nt0fQ-000LWR-TB for freebsd-questions@freebsd.org; Sat, 20 Mar 2010 15:32:49 +0000 From: Mike Clarke To: freebsd-questions@freebsd.org Date: Sat, 20 Mar 2010 15:32:48 +0000 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201003201532.48793.jmc-freebsd2@milibyte.co.uk> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-SA-Exim-Scanned: No (on curlew.milibyte.co.uk); SAEximRunCond expanded to false X-Plusnet-Relay: ba6307b70eb23bd8be10c5361955ab23 Subject: Copying mirrored partitions - will this work? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2010 15:32:50 -0000 I'm currently running 8.0-RELEASE and am considering experimenting with 8.0-STABLE. I'd like to preserve my existing system in case things go pear-shaped so I'll copy the entire system onto a spare slice and then use csup to upgrade the copy to STABLE. Normally I'd go through the steps of bsdlabel, newfs and then dump|restore to create the copy but I'm wondering if I can take advantage of my recently created gmirror to cut down the work. I have two 500GB disks, /dev/ad4 and /dev/ad8, each partitioned into 4 slices of 88, 88, 42 and 259GB. My system is installed on the first slices (ad4s1 and ad8s1) which are mirrored as /dev/mirror/gm0. The second slices (ad4s2 and ad8s2) are currently unused. My thoughts are to temporarily add ad4s2 into gm0 with "gmirror insert gm0 ad4s2" and wait for the mirror to synchronise. I should then be able to remove the temporary addition with "gmirror remove gm0 /dev/ad4s2" at which point ad4s2 should be a duplicate of the original system and I can then go ahead and create a new mirror with "gmirror label -b load gm1 ad4s2" and "gmirror insert gm1 ad8s2". After editing /etc/fstab in the new mirror to use gm1 instead of gm0 I should then be able to boot into the system on slice 2 and upgrade it to STABLE while still keeping my original system to fall back to if required. Is this approach of moving disks from one mirror to another workable, or have I missed something that would lead me into deep trouble? I don't mind unduly if I make a mess of the second slice and have to start again but I don't want to lose the contents of my original system on slice 1. -- Mike Clarke