Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jan 2007 04:13:28 +0100
From:      "Hansa" <mythtv@logic-q.nl>
To:        "R. B. Riddick" <arne_woerner@yahoo.com>, "freebsd geom" <freebsd-geom@FreeBSD.ORG>
Subject:   RE: How do I gmirror slices?
Message-ID:  <LHEFLGAENILPPDJIHADOMEIACFAA.mythtv@logic-q.nl>
In-Reply-To: <20070127230930.96837.qmail@web30305.mail.mud.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
First of all. Sorry for the other messages. I had some problems sending mail
to the list.

> Van: R. B. Riddick [mailto:arne_woerner@yahoo.com]
> > 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?
Yes, forgot to mention.

> 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)
Not sure what you mean by the above. I'm not familiar with the terms you
(and gmirror manpage) use.
Where do I place the consumer; what is the provider's last sector?
Though I speak an read English fairly well, it is not my native language and
sometimes it's hard to understand writings in it :)

Considder my setup below:

[----------------------- ad4 ----------------------] (disk)
[--------- s1 ---------][---- s2 ----][---- s3 ----] (slices)
[[--a--][--b--][--d--]*][[--- d ---]*][[--- d ---]*] (partitions)

I think the metadata is stored at '*'
Is it one sector (512Bytes?) smaller than size(a) + size(b) + size(d) (same
for s2d and s3d).

> > 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.
Here they are:
# /dev/ad4s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  4192256        0    4.2BSD        0     0     0
  b:  4192256  4192256      swap
  c: 12578832        0    unused        0     0         # "raw" part, don't
edit
  d:  4194320  8384512    4.2BSD        0     0     0

# /dev/ad4s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 147814065        0    unused        0     0         # "raw" part, don't
edit
  d: 147814065        0    4.2BSD     2048 16384 28552

# /dev/ad4s3:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 425706435        0    unused        0     0         # "raw" part, don't
edit
  d: 425706435        0    4.2BSD     2048 16384 28552

> 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)?
Home is mainly used to store music and movies. I plan to tar other improtant
data to the mirror.
I'd like to do raid5. But since I currently lack time to install and
configure a complete new system I thought this was the quickest way. Also my
disks are not the same size and it would be a shame to loose the space left
on larger onces :)

- Hansa




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