Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 1999 12:07:30 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "David E. Cross" <crossd@cs.rpi.edu>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: vinum in -current
Message-ID:  <19990623120730.H76907@freebie.lemis.com>
In-Reply-To: <199906230214.WAA26278@cs.rpi.edu>; from David E. Cross on Tue, Jun 22, 1999 at 10:14:55PM -0400
References:  <grog@lemis.com> <199906230214.WAA26278@cs.rpi.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 22 June 1999 at 22:14:55 -0400, David E. Cross wrote:
> Ok, now that you have fixed the strerr() bug, I have another -current
> vinum dilema...
>
> I have 3 disks... da0, da1, and da2.  da0 has a 100M /, 200M /var,
> 2048M /usr, 512M swap.  each of da1 and da2 have 512M swap.
> I have a vinum config similiar to:
>
> disk drive1 /dev/da0s1h
> disk drive2 /dev/da1s1h
> disk drive3 /dev/da2s1h
>
> volume data
>  plex org striped 4m
>   sd len 5000m drive drive1
>   sd len 5000m drive drive2
>   sd len 5000m drive drive3
>  plex org striped 4m
>   sd len 2000m drive drive2
>   sd len 2000m drive drive3
>
> When I "vinum create" this the last plex (doesn't matter if I reverse the
> order of the plexes in the file, it is the last defined plex that this
> refers to) is always in "status: initializing", and never leaves, the sd-s
> of that plex are listed "empty".

This is a feature, not a bug, and it's described in vinum(8):

  setupstate       When creating a multi-plex volume, assume that the
                   contents of all the plexes are consistent.  This is
                   normally not the case, and correctly you should use
                   the init command to first bring them to a
                   consistent state.  In the case of striped and
                   concatenated plexes, however, it does not normally
                   cause problems to leave them inconsistent: when
                   using a volume for a file system or a swap
                   partition, the previous contents of the disks are
                   not of interest, so they may be ignored.  If you
                   want to take this risk, use this keyword.  It will
                   only apply to the plexes defined immediately after
                   the volume in the configuration file.  If you add
                   plexes to a volume at a later time, you must
                   integrate them.

> Also, it lists the size of the volume as 15G... *NOT* 19G.

That's correct.

> This is true even if the 15G is listed second and is in the
> "initializing" status.  This is -CURRENT as of today.  Any ideas?

I think you misunderstand what this config does.  Each plex replicates
the entire address space of the volume, so this gives you a 16 GB
volume with the first 4 GB mirrored.  I suspect that you're trying to
get a non-mirrored, striped volume with a total of 19 GB.
Unfortunately, you currently can't do that in a sensible manner with
drives of unequal sizes.  One possibility would be:

disk drive1 /dev/da0h
disk drive2 /dev/da1h
disk drive3 /dev/da2h

volume data                                                        
 plex org striped 512k
  sd len 1000m drive drive1                                            
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive1                                            
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive1                                            
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive1                                            
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive1                                            
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   
  sd len 1000m drive drive2
  sd len 1000m drive drive3                                                                   

You'll note that I've changed the stripe size from 4m to 512k; there
are some indications that a larger stripe size is not beneficial,
though I currently can't say why.

I've also changed the names of the drives.  With the old ones, you
won't be able to start the volume after a reboot.  To quote vinum(8):

     drive name option

           Define a drive.  The option must be:

           device devicename   Specify the device on which the drive resides.
                               devicename must be the name of a disk compati-
                               bility partition, for example /dev/da1e or
                               /dev/wd3h, and it should be of type vinum. Do
                               not use the c partition, which is reserved for
                               the complete disk, and should be of type
                               unused. It is currently possible to create
                               drives on other disk devices, for example
                               /dev/da0s1 or /dev/da0s1e, but it will not be
                               possible to start these drives after a reboot.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


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




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