From owner-freebsd-stable@FreeBSD.ORG Sat Jan 22 23:04:46 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B24D106566C; Sat, 22 Jan 2011 23:04:46 +0000 (UTC) (envelope-from lists@mawer.org) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id B18C68FC14; Sat, 22 Jan 2011 23:04:45 +0000 (UTC) Received: by gyf3 with SMTP id 3so944208gyf.13 for ; Sat, 22 Jan 2011 15:04:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.123.9 with SMTP id v9mr1640874anc.125.1295736124465; Sat, 22 Jan 2011 14:42:04 -0800 (PST) Received: by 10.100.152.4 with HTTP; Sat, 22 Jan 2011 14:42:04 -0800 (PST) In-Reply-To: References: <57200BF94E69E54880C9BB1AF714BBCBDD3043@w2003s01.double-l.local> <57200BF94E69E54880C9BB1AF714BBCBDD3056@w2003s01.double-l.local> <4D398888.4040207@yandex.ru> Date: Sun, 23 Jan 2011 09:42:04 +1100 Message-ID: From: Antony Mawer To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org Subject: Re: Gpart and gmirror 8.2 from 18 januari X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2011 23:04:46 -0000 On Sat, Jan 22, 2011 at 12:55 AM, Ivan Voras wrote: > On 21/01/2011 14:22, Andrey V. Elsukov wrote: >> >> On 21.01.2011 16:03, Ivan Voras wrote: >>> >>> On 21/01/2011 13:56, Johan Hendriks wrote: >>>> >>>> Ok the funny thing is, i get the same error on 8.1 Release (the corrupt >>>> error), but it boots, >>>> and all seems to work. >>> >>> Maybe the boot process was made to be more standard-compliant :) >> >> The most strangest is that UFS's label ufsid/4b9545d7d72d5019 is >> represented >> as whole disk where GPT is located. > > This is how glabel works - if anything within a provider recognizes it as > its own (e.g. a file system), the whole provider is labeled for it. > > Or are you thinking about something else? If you first did gmirror, then > gpt, then newfs, the UFS label should be created with the same data as the > gpt partition, not the "whole disk". On 8.0 (haven't checked 8.1 or later), I have systems running with gmirror across two disks (say ad4 and ad6), with gpt then configured over the top of this. I have noticed the occasional "GPT corrupt" message on bootup on some of these systems - not sure if this is because it looks at the disk device first at boot time and sees the last sector is the gmirror metadata, rather than the GPT data? They seem to operate without function, aside from the slightly scary warning message. To build these systems the following commands are used: # Initialise the gmirror device /sbin/gmirror label -b load gm0 ad4 ad6 # Partition using gpart diskdev="mirror/gm0" boot_offset="2032" gpart add -l boot -t freebsd-boot -s 16 -b $boot_offset $diskdev # boot p1 gpart add -l root -t freebsd-ufs -s 2G -b $root_offset $diskdev # / p2 gpart add -l swap -t freebsd-swap -s 4G $diskdev # swap p3 gpart add -l var -t freebsd-ufs -s 4G $diskdev # /var p4 gpart add -l usr -t freebsd-ufs $diskdev # /usr p5 # Boot code gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $diskdev # Mark partition active (older systems) echo 'a 1' | fdisk -f - /dev/$diskdev Any feedback welcome! --Antony