How do I gmirror slices?

R. B. Riddick arne_woerner at yahoo.com
Sat Jan 27 23:09:31 UTC 2007


--- Coen Bröcker <c.brocker at logic-q.nl> wrote:
> Currently ad4 contains 3 partitions:
> ad4s1 swap, / and /var
> ad4s2 /usr
> ad4s3 /home
> I wan't to mirror ad4s1 and ad4s2. I want to stripe ad4s3. Below is my
> current slice setup.
>
So u have another disk?

Or do u want to mirror ad4s1 to ad4s2? That would be not so wise (performance,
safety)...

> Offset       Size(ST)        End     Name  PType       Desc  Subtype
> Flags
> 
>          0         63         62        -     12     unused        0
>         63   12578832   12578894    ad4s1      8    freebsd      165
>   12578895  147814065  160392959    ad4s2      8    freebsd      165
>  160392960  425706435  586099394    ad4s3      8    freebsd      165
>  586099395      15309  586114703        -     12     unused        0
> 
> Before I continue setting up the mirror I want to make sure I've setup my
> slices correctly.
> Reading the gmirror man page it states that the gmirror utility uses on-disk
> metadata (stored in the provider's last sector) to store all needed
> information.
> Since I'm no expert in understanding disk structures I'm not sure what the
> above means.
>
gmirror/gstripe use the last sector of its consumers for meta data, and provide
a device that is one sector shorter than the smalles consumer.

E. g.:
gmirror(name=X, consumers=(ad99s1(size=1GB), ad77(size=2GB)), size=1GB-512B)

> In my case I think I should create the folowing slice setup:
> my last partition on ad4s1 must end at 12578893 instead of 12578894. The
> next partition should begin at 12578895 and end at 160392958 creating the
> space to store metadata.
> 
The problem with an existing installation is, that it is possible that the last
sector of ad4s1 and ad4s2 and ad4s3 is used by a file system. So we need to
know the bsdlabel of ad4s1 and ad4s2 and ad4s3 in order to give useful advice.

I just wonder why u want to stripe (without any safety) the home fs, which
contains most likely quite important and difficult to restore data, while u
want to mirror (with disk failure protection) the root-fs (/), although u can
just put a CD into ur box and restore it... R u sure, that u dont want to
mirror ur home fs, too (or graid3 (e. g. 2disks (data) +1disk (parity)) or so)?

-Arne


 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/


More information about the freebsd-geom mailing list