gmirror size question
R. B. Riddick
arne_woerner at yahoo.com
Thu Sep 14 09:28:22 PDT 2006
Hi!
--- Oliver Fromme <olli at 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
More information about the freebsd-geom
mailing list