Date: Sun, 23 Jan 2011 09:42:04 +1100 From: Antony Mawer <lists@mawer.org> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-stable@freebsd.org Subject: Re: Gpart and gmirror 8.2 from 18 januari Message-ID: <AANLkTi=qLW4-ZUbjNHdFuQvfv%2BjjM8cmkLDs-j_soS2F@mail.gmail.com> In-Reply-To: <ihc392$r94$1@dough.gmane.org> References: <57200BF94E69E54880C9BB1AF714BBCBDD3043@w2003s01.double-l.local> <ihbq34$ahc$1@dough.gmane.org> <57200BF94E69E54880C9BB1AF714BBCBDD3056@w2003s01.double-l.local> <ihc07a$9kc$2@dough.gmane.org> <4D398888.4040207@yandex.ru> <ihc392$r94$1@dough.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 22, 2011 at 12:55 AM, Ivan Voras <ivoras@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=qLW4-ZUbjNHdFuQvfv%2BjjM8cmkLDs-j_soS2F>