Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2006 17:59:51 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-geom@FreeBSD.ORG
Subject:   gmirror size question
Message-ID:  <200609141559.k8EFxp2P056652@lurza.secnetix.de>

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

I've read the gmirror manpage and the Handbook section,
and even had a short look at the source, but couldn't
find an answer ...

I plan to setup gmirror for a production server with two
identical disks (Fujitsu U160 SCSI); they have exactly
the same number of blocks.

Now I wonder what will happen if one drive fails and I
won't be able to get a drive with exactly the same size.
The problem is that not all 74GB drives have exactly the
same number of blocks, not even those from the same
vendor.  Using the next larger size (147GB) would be a
waste.

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?

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.

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.

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.

So ...  what's the best solution to the problem?
Any comments and ideas are appreciated.

Best regards
   Oliver

PS:  No need to Cc me; I'm reading the list.

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Documentation is like sex; when it's good, it's very, very good,
and when it's bad, it's better than nothing."
        -- Dick Brandon



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