From owner-freebsd-stable@FreeBSD.ORG Sun Feb 6 00:45:54 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09AB416A4CE; Sun, 6 Feb 2005 00:45:54 +0000 (GMT) Received: from merlin.alerce.com (w094.z064001164.sjc-ca.dsl.cnc.net [64.1.164.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F72D43D41; Sun, 6 Feb 2005 00:45:53 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from merlin.alerce.com (localhost [127.0.0.1]) by merlin.alerce.com (Postfix) with ESMTP id EAA2420C7; Sat, 5 Feb 2005 16:41:20 -0800 (PST) Received: from satchel.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) Authority" (verified OK)) by merlin.alerce.com (Postfix) with ESMTP id AC31620C0; Sat, 5 Feb 2005 16:41:20 -0800 (PST) Received: from satchel.alerce.com (localhost [127.0.0.1]) by satchel.alerce.com (8.13.1/8.13.1) with ESMTP id j160jpfi004850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 5 Feb 2005 16:45:51 -0800 (PST) (envelope-from hartzell@satchel.alerce.com) Received: (from hartzell@localhost) by satchel.alerce.com (8.13.1/8.13.1/Submit) id j160jpdf004847; Sat, 5 Feb 2005 16:45:51 -0800 (PST) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16901.26814.588055.457273@satchel.alerce.com> Date: Sat, 5 Feb 2005 16:45:50 -0800 To: freebsd-stable@freebsd.org, freebsd-geom@freebsd.org X-Mailer: VM 7.17 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid X-Virus-Scanned: ClamAV using ClamSMTP cc: Pawel Jakub Dawidek Subject: Problem with migrating onto a gmirror slice. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2005 00:45:54 -0000 I have a system that I set up to use a gmirror back in the 5.3beta days. It's running fine but I don't remember exactly how I set it up. It's a scsi system w/ two identical disks. I'd like to migrate the installation to a new box that uses ide disks, and am basing my attempts on the "GEOM mirror Approach 2: Single Slice, Preferred, More Flexible" portion of these instructions: http://people.freebsd.org/~rse/mirror/ Although the disk that I ended up with was bootable in the new system, I noticed that the slice table was messed up. After a couple of tries, here's what I've found: The machine is: FreeBSD merlin.alerce.com 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #9: Sat Dec 18 12:38:37 PST 2004 root@merlin.alerce.com:/usr/obj/usr/src/sys/MERLIN i386 Here's the series of commands that I've performed to illustrate the problem: 138 15:31 fdisk -v -B -I /dev/ad0 139 15:31 fdisk -s /dev/ad0 140 15:31 fdisk -s /dev/ad0 > ~hartzell/fdisk-initial 141 15:32 gmirror label -v -n -b round-robin disk0 /dev/ad0s1 142 15:32 fdisk -s /dev/ad0 143 15:32 bsdlabel -w -B mirror/disk0 144 15:32 bsdlabel -e mirror/disk0 145 15:33 fdisk -s /dev/ad0 146 15:34 fdisk -s /dev/ad0 > ~hartzell/fdisk-after 147 15:34 history 148 15:34 history > ~hartzell/history After the fdisk at line 138, here's the slice table: /dev/ad0: 387621 cyl 16 hd 63 sec Part Start Size Type Flags 1: 63 390721905 0xa5 0x80 The fdisk at line 142 showed that the slice table was fine after the gmirror step. But after the bsdlabels at lines 143 and 144 the slice table looks like this: /dev/ad0: 387621 cyl 16 hd 63 sec Part Start Size Type Flags 4: 0 50000 0xa5 0x80 Here's the output of "bsdlabel /dev/mirror/disk0": # /dev/mirror/disk0: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 524272 16 4.2BSD 2048 16384 32768 b: 8336976 524288 swap c: 390721904 0 unused 0 0 # "raw" part, don't edit d: 524288 8861264 4.2BSD 2048 16384 32776 e: 524288 9385552 4.2BSD 2048 16384 32776 f: 380812064 9909840 4.2BSD 2048 16384 28552 Anyone see what I'm missing? g.