From owner-freebsd-questions@FreeBSD.ORG Tue Feb 16 19:00:47 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 AFBEB1065679 for ; Tue, 16 Feb 2010 19:00:47 +0000 (UTC) (envelope-from up@3.am) Received: from mail.pil.net (ns3.pil.net [209.17.170.205]) by mx1.freebsd.org (Postfix) with SMTP id 81F018FC1B for ; Tue, 16 Feb 2010 19:00:46 +0000 (UTC) Received: (qmail 64269 invoked from network); 16 Feb 2010 14:00:46 -0500 Received: from unknown (HELO localhost) (127.0.0.1) by 0 with SMTP; 16 Feb 2010 14:00:46 -0500 Date: Tue, 16 Feb 2010 14:00:46 -0500 (EST) From: James Smallacombe X-X-Sender: up@mail.pil.net To: FreeBSD Questions List Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: 'gmirror clear' error 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: Tue, 16 Feb 2010 19:00:47 -0000 After using gmirror on a 7.2-STABLE server for 6 months, a hardware failure followed by a corrupted file system (wouldn't boot cleanly) required that I bring up a new server and copy over some of the file systems to the new server. I use only one slice, but with the following BSD partitions: / (incl /usr) clean install 7.2-RELEASE /usr/local copied from one of the old mirror disks /var clean install with some files and dirs copied over /tmp clean /home (customer data) copied from old disk Once getting this up and running (production server) on /dev/ad0, I then followed the excellent instructions on the wiki here: http://www.freebsdwiki.net/index.php...,_How_to_setup in single user mode to set up mirroring on /dev/ad0 and /dev/ad2. One of the old disks is still on /dev/ad3 in case we need any old files we might have missed. The only glitch that I ran into following the instructions was when I tried to clear out the old gmirror meta data doing a "gmirror clear" as prescribed. I was in a hurry to get the server back up, so I unfortunately don't have the exact error, but it basically was telling me the argument was not valid, even though the dev names were correct and worked for every other step. The server is up and running fine with it's mirror and the third, old disk as you would expect: Code: /dev/mirror/gm0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/mirror/gm0s1g on /home (ufs, local, soft-updates) /dev/mirror/gm0s1d on /tmp (ufs, local, soft-updates) /dev/mirror/gm0s1e on /usr/local (ufs, local, soft-updates) /dev/mirror/gm0s1f on /var (ufs, local, soft-updates) /dev/ad3s1a on /mnt/OLD (ufs, local) /dev/ad3s1d on /mnt/OLD/tmp (ufs, local, soft-updates) /dev/ad3s1e on /mnt/OLD/usr/local (ufs, local, soft-updates) /dev/ad3s1f on /mnt/OLD/var (ufs, local, soft-updates) /dev/ad3s1g on /mnt/OLD/home (ufs, local, soft-updates) devfs on /var/named/dev (devfs, local) However, I am concerned about old meta data causing problems. The wiki states: Make ABSOLUTELY CERTAIN that you don't have any pre-existing GEOM module labels written to either of your drives - because if you do (for instance from having futzed about with this before finding this article, or trying the article once and then trying it again) it will prevent other things from working. So, clean off any preexisting metadata from each drive: Code: # gmirror clear /dev/ad0 # gmirror clear /dev/ad2 As I noted, the above produced an error (that I can't recall, unfortunately) with both devices. On boot, I got the following: Code: +ad0: 476940MB at ata0-master SATA150 +GEOM_MIRROR: Device mirror/gm0 launched (1/1). +acd0: DVDR at ata0-slave SATA150 +ad2: 476940MB at ata1-master SATA150 +ad3: 476940MB at ata1-slave SATA150 +SMP: AP CPU #1 Launched! +GEOM_LABEL: Label for provider acd0 is iso9660/FreeBSD_Install. +GEOM_LABEL: Label for provider mirror/gm0s1a is ufsid/4b70da022dd1047b. +GEOM_LABEL: Label for provider mirror/gm0s1d is ufsid/4b70da0d55f96d5b. +GEOM_LABEL: Label for provider mirror/gm0s1e is ufsid/4b70da0e19c93161. +GEOM_LABEL: Label for provider mirror/gm0s1f is ufsid/4b70da0e20e9242f. +GEOM_LABEL: Label for provider mirror/gm0s1g is ufsid/4b70da02f80cbfe5. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1a is ufsid/4a3ae4de0a56c8cb. +GEOM_LABEL: Label for provider ad3s1d is ufsid/4a3ae4eb9b4cf2fe. +GEOM_LABEL: Label for provider ad3s1e is ufsid/4a3ae4ec717e3bed. +GEOM_LABEL: Label for provider ad3s1f is ufsid/4a3ae4ec312ebf3b. +GEOM_LABEL: Label for provider ad3s1g is ufsid/4a3ae4dfa451f7f0. +Trying to mount root from ufs:/dev/mirror/gm0s1a +GEOM_LABEL: Label ufsid/4b70da022dd1047b removed. +GEOM_LABEL: Label for provider mirror/gm0s1a is ufsid/4b70da022dd1047b. +GEOM_LABEL: Label ufsid/4b70da02f80cbfe5 removed. +GEOM_LABEL: Label ufsid/4a3ae4de0a56c8cb removed. +GEOM_LABEL: Label for provider mirror/gm0s1g is ufsid/4b70da02f80cbfe5. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1a is ufsid/4a3ae4de0a56c8cb. +GEOM_LABEL: Label ufsid/4b70da0d55f96d5b removed. +GEOM_LABEL: Label for provider mirror/gm0s1d is ufsid/4b70da0d55f96d5b. +GEOM_LABEL: Label ufsid/4a3ae4eb9b4cf2fe removed. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1d is ufsid/4a3ae4eb9b4cf2fe. +GEOM_LABEL: Label ufsid/4b70da0e19c93161 removed. +GEOM_LABEL: Label for provider mirror/gm0s1e is ufsid/4b70da0e19c93161. +GEOM_LABEL: Label ufsid/4a3ae4ec717e3bed removed. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1e is ufsid/4a3ae4ec717e3bed. +GEOM_LABEL: Label ufsid/4b70da0e20e9242f removed. +GEOM_LABEL: Label for provider mirror/gm0s1f is ufsid/4b70da0e20e9242f. +GEOM_LABEL: Label ufsid/4a3ae4ec312ebf3b removed. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1f is ufsid/4a3ae4ec312ebf3b. +GEOM_LABEL: Label ufsid/4a3ae4dfa451f7f0 removed. +GEOM_MIRROR: Device gm0 already configured. +GEOM_LABEL: Label for provider ad3s1g is ufsid/4a3ae4dfa451f7f0. +GEOM_LABEL: Label ufsid/4b70da022dd1047b removed. +GEOM_LABEL: Label ufsid/4b70da02f80cbfe5 removed. +GEOM_LABEL: Label ufsid/4b70da0d55f96d5b removed. +GEOM_LABEL: Label ufsid/4b70da0e19c93161 removed. +GEOM_MIRROR: Device gm0: rebuilding provider ad2. +GEOM_MIRROR: Device gm0: rebuilding provider ad2 finished. How concerned to I have to be? I'm not worried about any meta data on /dev/ad3, but if I have to, is there a way to clear the old meta data out of the mirrored devices without taking it down to single user mode again? Thanks! James Smallacombe PlantageNet, Inc. CEO and Janitor up@3.am http://3.am =========================================================================