Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 22:46:20 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        freebsd-fs@freebsd.org, Alexander Motin <mav@freebsd.org>, Alexander Best <arundel@freebsd.org>
Subject:   Re: Why not just name the cam-ata devices the same as the old names?
Message-ID:  <BANLkTinSEg90d4=YaKfLZLKVOLn_si6LSg@mail.gmail.com>
In-Reply-To: <4DB759A1.4050201@FreeBSD.org>
References:  <4DB70949.6090104@FreeBSD.org> <20110426182017.GA92471@freebsd.org> <4DB70F13.6060002@FreeBSD.org> <BANLkTikFHLaQ=Vrt9UhyJdo5ELm522OZjA@mail.gmail.com> <4DB759A1.4050201@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 26, 2011 at 4:47 PM, Doug Barton <dougb@freebsd.org> wrote:
> On 04/26/2011 16:04, Mikael Fridh wrote:
>>
>> Are labels such a perilous affair that you can't just start
>> recommending them and/or default to them?
>
> As far as I can tell, yes. We have various different tools that do different
> things, all calling themselves "labels" which don't all work together well.
> It's also unclear how many (if any) of those solutions will survive the file
> system being newfs'ed.

This is where labelling *disks* is the better route.  Filesystems come
and go, but the disks don't change very often.  This is one the nicest
things about using FreeBSD systems (all the GEOM stacking and
labelling).

The only issue I've come across is that GPT stores the secondary
header in the last physical sector of the *disk* and not the last
physical sector of the GEOM provider, so you end up with spurious
"errors" when using labelled disks, gmirror'd labels, and
GPT-partitioned mirrors.  :(

If that one issue was resolved, than a glabel'd disk would be the
perfect solution.

(going from memory)
glabel label mydisk0 da0
glabel label mydisk1 da1
gmirror label label/mydisk0 gm0
gmirror add label/mydisk1 gm0
gpart -s GPT mirror/gm0
<add your gpart partitions, newfs them, etc>

Doesn't matter where you move the disks in the system, everything
"just works" (with that one "error" message about the secondary GPT
label).

-- 
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTinSEg90d4=YaKfLZLKVOLn_si6LSg>