Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 2004 12:06:24 -0400
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: building a mirror in a partition
Message-ID:  <1096128383.10839.20.camel@zappa.Chelsea-Ct.Org>
In-Reply-To: <20040925134112.GL9550@darkness.comp.waw.pl>
References:  <4153441A.9010303@withagen.nl> <41556BE2.5060803@withagen.nl> <20040925134112.GL9550@darkness.comp.waw.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2004-09-25 at 09:41, Pawel Jakub Dawidek wrote:
> On Sat, Sep 25, 2004 at 03:00:18PM +0200, Willem Jan Withagen wrote:
> +> >Yes. It is because gstripe store metadata in the last provider's sector
> +> >and if two providers ends in the same place - you have a problem.
> +> >In that case, you should create you stripe by adding '-h' option, which
> +> >will add provider's name to metadata, so only this provider will be
> +> >connected to your stripe.
> +> > 
> +> >
> +> the -h was my friend.....
> +> I do not really understand why it was trying to use the whole slice for 
> +> mirroring?? But that might be my ignorance.
> 
> Because those two providers share the same last sector, so they share
> the same metadata and there is no information by default, which provider
> is the right one (you should add '-h' option).
> IMHO this is a better behaviour, because you can move your disk, copy it
> to another disk via dd(1), etc. and it will be still recognized by gmirror.

Just to seek clarification, is the above strictly true?  If I hard code,
say, ad0 as a provider name and then move the disk so that it then
becomes, say, ad4, won't geom_mirror get confused when trying to
activate the mirror and there is no longer an ad0 provider in the system
(or ad0 becomes something different entirely)?

As a realistic scenario, I have a Dell system whose BIOS is not very
good when it comes to boot flexibility: it will only let you boot the
master device on the first ATA channel when booting ATA hard drives. 
So, if you have a two-drive mirror, one master and one slave on the same
ATA channel (i.e., ad0 and ad1) and the master drive dies, then the only
way to boot the system is physically to change the slave so it is now
master.  In other words, the ad1 drive then becomes ad0.  If hard coding
the raw providers, I think this would create problems for geom_mirror
when rebooting such a switched setup, because there would no longer be
an ad1.  (That system currently uses a root-on-vinum setup, but because
Vinum uses logical names for drives that are stored on the disk itself,
it's not a problem to switch around ATA ids in that setup.)

For that reason, I have adopted the policy of using geom_label to label
my underlying providers and then add only the labelled devices to
higher-level aggregations (such as mirrors and stripes).  That way, the
mirrors, stripes, etc. are using truly logical identifiers that are not
"tied down" like hardware device names might be, and really are free to
be moved about.  (I think of the geom_label identifiers the same as the
component identifiers used when creating RAID sets in RAIDframe on
NetBSD, except geom_labels have a more general application.)

Cheers,

Paul.
-- 
e-mail: paul@gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa



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