From owner-freebsd-stable@FreeBSD.ORG Fri Jul 25 13:45:27 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9669B551 for ; Fri, 25 Jul 2014 13:45:27 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 43BE322D9 for ; Fri, 25 Jul 2014 13:45:26 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s6PDjOTY076583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 Jul 2014 07:45:24 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s6PDjNZS076580; Fri, 25 Jul 2014 07:45:24 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 25 Jul 2014 07:45:23 -0600 (MDT) From: Warren Block To: "Patrick M. Hausen" Subject: Re: Gmirror + gpart corruption on 9.3-PRE In-Reply-To: Message-ID: References: <53D1BDB2.7030906@jetcafe.org> <53D1DD47.4040403@jetcafe.org> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 25 Jul 2014 07:45:24 -0600 (MDT) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 13:45:27 -0000 On Fri, 25 Jul 2014, Patrick M. Hausen wrote: > Am 25.07.2014 um 07:34 schrieb Warren Block : >> True. But partitioning can be specific to the drive. It's not like GPT-partitioned drives can be copied with dd (well, not correctly). > > Errrr ... sorry, but ... could you please elaborate on that? Up until now I was sure that any drive could be > copied with dd(1). > > Puzzled. :-) GPT partitioning puts a primary partition table at the beginning of the drive, and a backup partition table at the end of the drive. Use dd to copy a 500G drive to a 1TB drive, and that backup partition is now in the middle of the drive. If the drives are even a single block different in size, that backup table will be in the wrong place, not found by the software and effectively lost. This is dd's bug/feature: it does not understand the data being copied. gpart(8) can back up and restore partition tables between differently-sized drives, and does it correctly.