Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2002 10:20:47 -0500 (EST)
From:      Jason Borkowsky <jcborkow@tcpns.com>
To:        Greg Lehey <grog@FreeBSD.org>
Cc:        questions@FreeBSD.org
Subject:   Re: Using VINUM to do RAID-1 disk mirroring
Message-ID:  <Pine.BSF.4.44.0203120956180.8452-100000@bemused.tcpns.com>
In-Reply-To: <20020312094817.S36158@wantadilla.lemis.com>

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

I really am trying very hard to understand all of this, and have spent hours
both reading about vinum and playing with it on my test box. In the process
I have learned a lot about master boot records, disk layout, etc, so it is
all good. So I just want to go over this to make sure I have it right. I
currently have two identical drives and want to have one mirror the other. I
have set up identical file systems (including swap, but swap won't be
mirrored). The drives look as follows:

/dev/ad0:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   204800        0    4.2BSD     2048 16384    97   # (Cyl.    0 - 12*)
  b:  4194304  3325952      swap                        # (Cyl.  207*- 468*)
  c: 80405262        0    unused        0     0         # (Cyl.    0 - 5004*)
  e:  1024000   204800    4.2BSD     2048 16384    90   # (Cyl.   12*- 76*)
  f:  2097152  1228800    4.2BSD     2048 16384    89   # (Cyl.   76*- 207*)
  g: 20971520  7520256    4.2BSD     2048 16384    89   # (Cyl.  468*- 1773*)
  h: 51913486 28491776    4.2BSD     2048 16384    89   # (Cyl. 1773*- 5004*)

/dev/ad2:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   204800        0    4.2BSD     2048 16384    97   # (Cyl.    0 - 12*)
  b:  4194304  3325952      swap                        # (Cyl.  207*- 468*)
  c: 80405262        0    unused        0     0         # (Cyl.    0 - 5004*)
  e:  1024000   204800    4.2BSD     2048 16384    90   # (Cyl.   12*- 76*)
  f:  2097152  1228800    4.2BSD     2048 16384    89   # (Cyl.   76*- 207*)
  g: 20971520  7520256    4.2BSD     2048 16384    89   # (Cyl.  468*- 1773*)
  h: 51913486 28491776    4.2BSD     2048 16384    89   # (Cyl. 1773*- 5004*)


Now, I need to change the file system type to vinum of all the partitions I
want to mirror:

/dev/ad0:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   204800        0    vinum      2048 16384    97   # (Cyl.    0 - 12*)
  b:  4194304  3325952      swap                        # (Cyl.  207*- 468*)
  c: 80405262        0    unused        0     0         # (Cyl.    0 - 5004*)
  e:  1024000   204800    vinum      2048 16384    90   # (Cyl.   12*- 76*)
  f:  2097152  1228800    vinum      2048 16384    89   # (Cyl.   76*- 207*)
  g: 20971520  7520256    vinum      2048 16384    89   # (Cyl.  468*- 1773*)
  h: 51913486 28491776    vinum      2048 16384    89   # (Cyl. 1773*- 5004*)

/dev/ad2:

#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   204800        0    vinum      2048 16384    97   # (Cyl.    0 - 12*)
  b:  4194304  3325952      swap                        # (Cyl.  207*- 468*)
  c: 80405262        0    unused        0     0         # (Cyl.    0 - 5004*)
  e:  1024000   204800    vinum      2048 16384    90   # (Cyl.   12*- 76*)
  f:  2097152  1228800    vinum      2048 16384    89   # (Cyl.   76*- 207*)
  g: 20971520  7520256    vinum      2048 16384    89   # (Cyl.  468*- 1773*)
  h: 51913486 28491776    vinum      2048 16384    89   # (Cyl. 1773*- 5004*)


I now do my vinum configuration (which actually is the easy part, since
there are a lot of examples on that plus I can play around with it on my
test machine). The config will look something like this:

drive ad0s1a device /dev/ad0s1a
drive ad2s1a device /dev/ad2s1a
drive ad0s1e device /dev/ad0s1e
drive ad2s1e device /dev/ad2s1e
drive ad0s1f device /dev/ad0s1f
drive ad2s1f device /dev/ad2s1f
drive ad0s1g device /dev/ad0s1g
drive ad2s1g device /dev/ad2s1g
drive ad0s1h device /dev/ad0s1h
drive ad2s1h device /dev/ad2s1h
volume mirror setupstate
plex org concat
sd length 0 drive ad0s1a
plex org concat
sd length 0 drive ad2s1a
volume mirror setupstate
plex org concat
sd length 0 drive ad0s1e
plex org concat
sd length 0 drive ad2s1e
volume mirror setupstate
plex org concat
sd length 0 drive ad0s1f
plex org concat
sd length 0 drive ad2s1f
volume mirror setupstate
plex org concat
sd length 0 drive ad0s1g
plex org concat
sd length 0 drive ad2s1g
volume mirror setupstate
plex org concat
sd length 0 drive ad0s1h
plex org concat
sd length 0 drive ad2s1h

Then I start up vinum, read in my config, and use something called a
"revive" command which will then sync up all of the partitions, and then
vinum will keep everything in sync.

Meanwhile, I also create a boot floppy (or, even, a separate boot harddrive)
which I use in case of an emergency, which would allow me to boot in case of
an emergency (failed hard drive, corrupt file system, etc).

So now does this sequence of events sound about right? Is there anything I
missed? Hopefully I am getting there as I finally think I'm grasping all of
this. Thanks again!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0203120956180.8452-100000>