Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2001 13:43:42 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Scott Culverhouse <scott.culverhouse@opencube.co.uk>
Cc:        FreeBSD Questions <questions@FreeBSD.org>
Subject:   Re: vinum - mirroring!
Message-ID:  <20010428134342.K69945@wantadilla.lemis.com>
In-Reply-To: <20010427105501.C415.SCOTT.CULVERHOUSE@opencube.co.uk>; from scott.culverhouse@opencube.co.uk on Fri, Apr 27, 2001 at 11:11:45AM %2B0100
References:  <20010426111634.C3FC.SCOTT.CULVERHOUSE@opencube.co.uk> <20010427084328.C70059@wantadilla.lemis.com> <20010427105501.C415.SCOTT.CULVERHOUSE@opencube.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
[Format recovered--see http://www.lemis.com/email/email-format.html]

Machine output was wrapped.

On Friday, 27 April 2001 at 11:11:45 +0100, Scott Culverhouse wrote:
> On Fri, 27 Apr 2001 08:43:28 +0930
> Greg Lehey <grog@lemis.com> wrote:
>
>> On Thursday, 26 April 2001 at 11:19:27 +0100, Scott Culverhouse wrote:
>>> Hi we have a machine with 2 x 36Gb SCSI drives and we want to put var
>>> and usr on to 2 vinum volumes. But we want both performance and
>>> resilience can they be done with two drives only?
>>>
>>> Here is a config I propose but not sure whether it will work too well or
>>> not:- Is it ok?
>>>
>>> drive sd0 device /dev/da0e
>>> drive sd1 device /dev/da0f
>>
>> You shouldn't put more than one drive on a spindle.
>>
>>> drive sd2 device /dev/da1e
>>> drive sd3 device /dev/da1h
>>>
>>> volume var
>>>   plex org striped 256k
>>
>> You don't want a stripe size which is a power of 2.
>>
>>>     sd length 5g drive sd0
>>>     sd length 5g drive sd1
>>>   plex org striped 256k
>>>     sd length 5g drive sd2
>>>     sd length 5g drive sd3
>>>
>>> volume usr
>>>   plex org striped 256k
>>>     sd length 10g drive sd0
>>>     sd length 10g drive sd1
>>
>> This would give you terrible performance like this.  You'd be adding
>> gratuitous seeks.  The two subdisks should be on different spindles.
>>
>>>   plex org striped 256k
>>>     sd length 10g drive sd2
>>>     sd length 10g drive sd3
>>>
>>> The reason I created 4 drives (2 slices on each drive) is so I could
>>> have 2 drives per plex is the a good or bad idea!
>>
>> It's a bad idea.  That's what we have subdisks.  Try this:
>>
>> drive a device /dev/da0e
>> drive b device /dev/da1e
>>
>> volume var
>>   plex org striped 273k
>>     sd length 5g drive a
>>     sd length 5g drive b
>>   plex org striped 273k
>>     sd length 5g drive b
>>     sd length 5g drive a
>>
>> volume usr
>>   plex org striped 273k
>>     sd length 10g drive a
>>     sd length 10g drive b
>>   plex org striped 273k
>>     sd length 10g drive b
>>     sd length 10g drive a
>>
>> Note that the subdisks on the second plex are the other way round;
>> otherwise the failure of a drive would cause you to lose half the
>> volume, which is obviously not what you want.
>>
>>> What size var and usr will this give me 5g and 10g respectively!
>>
>> This will give you 10g and 20g respectively.
>
> Thanks for the config but when I do:
>
> vinum -> create -f /etc/vinum.conf
>
> I get the following errors:
> ==============
> Apr 27 11:02:33  /kernel: vinum: drive a is up
> Apr 27 11:02:33  /kernel: vinum: drive b is up
> Apr 27 11:02:33  /kernel: vinum: removing 752 blocks of partial stripe at the end of var.p0
> Apr 27 11:02:33  /kernel: vinum: var.p0.s0 is up
> Apr 27 11:02:33  /kernel: vinum: var.p0.s1 is up
> Apr 27 11:02:33  /kernel: vinum: var.p0 is up
> Apr 27 11:02:33  /kernel: vinum: var is up
> Apr 27 11:02:33  /kernel: vinum: removing 752 blocks of partial stripe at the end of var.p1
> Apr 27 11:02:33  /kernel: vinum: var.p1 is faulty
> Apr 27 11:02:33  /kernel: vinum: removing 412 blocks of partial stripe at the end of usr.p0
> Apr 27 11:02:33  /kernel: vinum: usr.p0.s0 is up
> Apr 27 11:02:33  /kernel: vinum: usr.p0.s1 is up
> Apr 27 11:02:33  /kernel: vinum: usr.p0 is up
> Apr 27 11:02:33  /kernel: vinum: usr is up
> Apr 27 11:02:33  /kernel: vinum: removing 412 blocks of partial stripe at the end of usr.p1
> Apr 27 11:02:33  /kernel: vinum: usr.p1 is faulty
>
> Here is my output from "vinum list"
> ==============
> 2 drives:
> D a                     State: up       Device /dev/da0e        Avail: 2029/32749 MB (6%)
> D b                     State: up       Device /dev/da1e        Avail: 2029/32749 MB (6%)
>
> 2 volumes:
> V var                   State: up       Plexes:       2 Size:          9 GB
> V usr                   State: up       Plexes:       2 Size:         19 GB
>
> 4 plexes:
> P var.p0              S State: up       Subdisks:     2 Size:          9 GB
> P var.p1              S State: faulty   Subdisks:     2 Size:          9 GB
> P usr.p0              S State: up       Subdisks:     2 Size:         19 GB
> P usr.p1              S State: faulty   Subdisks:     2 Size:         19 GB
>
> 8 subdisks:
> S var.p0.s0             State: up       PO:        0  B Size:       5119 MB
> S var.p0.s1             State: up       PO:      273 kB Size:       5119 MB
> S var.p1.s0             State: empty    PO:        0  B Size:       5119 MB
> S var.p1.s1             State: empty    PO:      273 kB Size:       5119 MB
> S usr.p0.s0             State: up       PO:        0  B Size:          9 GB
> S usr.p0.s1             State: up       PO:      273 kB Size:          9 GB
> S usr.p1.s0             State: empty    PO:        0  B Size:          9 GB
> S usr.p1.s1             State: empty    PO:      273 kB Size:          9 GB

Looks good to me.  I suppose we could have used 'setupstate' here.

> ==============
>
> Here is the output from "disklabel da0"

We don't need this.

> Any ideas?

What's the issue?

> If I create a mirror using the "vinum mirror" command it creates a
> mirror ok full size of the disk!

Yes, this is the intention.  'mirror' is a quick and dirty tool.  For
real configurations you should use a config file.

> If I do a "vinum printconfig >myconf" then change the length in
> myconf to say 5g. If I then do "vinum resetconfig" and then do a
> "vinum create -f myconf" this does not work!
>
> I get the same results as the config you recommended!

Yes, you could use setupstate.

> Also final queston:-
> The config you gave (when it works) will that give increase read speed
> and resilience!

Yes.

> If a drive fails we want to be able to rebuild from the mirror set!

Yes, that's what you need to do right now.  You have two choices:

1.  Start the faulty plexes with the start command.

2.  Start again with this fractionally modified config file:

   drive a device /dev/da0e
   drive b device /dev/da1e
  
   volume var setupstate
     plex org striped 273k
       sd length 5g drive a
       sd length 5g drive b
     plex org striped 273k
       sd length 5g drive b
       sd length 5g drive a
  
   volume usr setupstate
     plex org striped 273k
       sd length 10g drive a
       sd length 10g drive b
     plex org striped 273k
       sd length 10g drive b
       sd length 10g drive a

Greg
--
When replying to this message, please take care not to mutilate the
original text.  
For more information, see http://www.lemis.com/email.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers

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?20010428134342.K69945>