Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2006 09:28:17 -0700 (PDT)
From:      "R. B. Riddick" <arne_woerner@yahoo.com>
To:        freebsd-geom@FreeBSD.ORG
Subject:   Re: gmirror size question
Message-ID:  <20060914162817.73998.qmail@web30306.mail.mud.yahoo.com>
In-Reply-To: <200609141559.k8EFxp2P056652@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

--- Oliver Fromme <olli@lurza.secnetix.de> wrote:
> If the new disk is sligtly larger, I guess there shouldn't
> be a problem.  When adding the new drive, gmirror will
> simply ignore the excess blocks, right?
>
Yup!

> However, I guess I'll run into trouble if the new drive
> is slightly smaller.  Therefore, it came to my mind that
> it might make sense to make the mirror slightly smaller
> from the beginning, i.e. let gmirror use only the first
> 73GB of the 74GB available.  That should be enough of a
> safety margin.
>
g_mirror.c says in g_mirror_check_metadata():
   if (sc->sc_mediasize > pp->mediasize) {
      G_MIRROR_DEBUG(1,
          "Invalid size of disk %s (device %s), skipping.", pp->name,
          sc->sc_name);
      return (EINVAL);
   }

> However, how do I do that?  gmirror(8) doesn't provide
> an option to specify the size of the consumer, or to
> let it ignore a certain amount of space at the end of
> it.
>
It is important to care about that before IT happens... :-)
Because: The file system might expect the last few sectors to exist...

I would use gnop during the "gmirror label" command in the hope, that gmirror
stores the mediasize permanently without further future checking... But that is
just a quick shot...

> My next thought was to create separate slice tables on
> both disks, with one slices of 73GB each (letting 1GB
> stay unused), and then put gmirror onto the slices
> (da0s1 + da1s1) instead of the whole disks (da0 + da1).
> I guess that would work, but in that case the MBR and
> slice tables wouldn't be mirrored, which could lead to
> trouble if one drive fails and GEOM (or anything else)
> tried to access the MBR for whatever reason.
>
Gah! :-)

-Arne


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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