From owner-freebsd-questions@FreeBSD.ORG Mon Oct 22 22:54:27 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 786EFD3A for ; Mon, 22 Oct 2012 22:54:27 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 1529A8FC0C for ; Mon, 22 Oct 2012 22:54:26 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q9MMsQx9013338; Mon, 22 Oct 2012 16:54:26 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q9MMsPDm013335; Mon, 22 Oct 2012 16:54:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 22 Oct 2012 16:54:25 -0600 (MDT) From: Warren Block To: freebsd@johnea.net Subject: Re: 9.1 and gmirror with GPT? In-Reply-To: <5085C743.8000508@johnea.net> Message-ID: References: <5082EAEE.4040609@johnea.net> <50833F78.1060609@bnrlabs.com> <5085C743.8000508@johnea.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Mon, 22 Oct 2012 16:54:26 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 22:54:27 -0000 On Mon, 22 Oct 2012, freebsd@johnea.net wrote: > On 10/21/2012 07:32 AM, Warren Block wrote: >> On Sun, 21 Oct 2012, Lucas B. Cohen wrote: >> >>> On 2012.10.20 20:17, freebsd@johnea.net wrote: >>>> Just wondering if 9.1 will bring any improvement to the situation of >>>> creating a full disk geom mirror while also using GPT partition table? >>> >>> I'm curious about what this is about. Could you refer me to an article >>> or a discussion where this issue is described ? >> >> The GPT backup partition tables goes at the end of a disk, the same >> place gmirror(8) and other GEOM modules keep metadata. If GPT >> partitions are created inside a mirror, the backup GPT table is no >> longer at the end of the disk. Hiroki Sato created a patch which fixed >> the gptboot complaints, but there was concern about the nonstandard >> location of the backup table. >> >> At present, MBR partitioning is recommended with gmirror(8). > > I've been reading your article on formatting disks in FreeBSD: > http://www.wonkity.com/~wblock/docs/html/disksetup.html > > It's a great description of using gpart to create GPT partitions, and using > fdisk and bsdlabel to create MBR partitions. Thanks! > Would you still recommend this method, using fdisk and bsdlabel, for MRB > setup? For drives with 512-byte blocks, they are equivalent. Only gpart can align the bsdlabel partitions to 4K. > Do you have any docs on setting up MBR using gpart, to allign for 4K sector > size drives? This is a copy from the update of the gmirror section I'm planning to commit to the Handbook. For a single drive, replace mirror/gm0 with just the drive name, like ada4. # create the MBR and add a FreeBSD slice gpart create -s MBR mirror/gm0 gpart add -t freebsd -a 4k mirror/gm0 # create the bsdlabel partitions in slice 1 (s1) gpart create -s BSD mirror/gm0s1 gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1 gpart add -t freebsd-swap -a 4k -s 4g mirror/gm0s1 gpart add -t freebsd-ufs -a 4k -s 2g mirror/gm0s1 gpart add -t freebsd-ufs -a 4k -s 1g mirror/gm0s1 gpart add -t freebsd-ufs -a 4k mirror/gm0s1 # put bootcode on the MBR and mark the first slice active gpart bootcode -b /boot/mbr mirror/gm0 gpart set -a active -i 1 mirror/gm0 # put bootcode on the bsdlabel gpart bootcode -b /boot/boot mirror/gm0s1