Subject: NetBSD 3.0, vinum and a FreeBSD 4.11 built vinum RAID-1 array
To: None <netbsd-users@netbsd.org>
From: Mark Cullen <mark.r.cullen@gmail.com>
List: netbsd-users
Date: 06/09/2006 21:53:17
Hi all,

I am looking to 'upgrade' my little home server from FreeBSD 4.11. I've 
got NetBSD 3.0 installed on a test box at the moment (and I must say 
it's quite cool once you get used to it), and have managed to get it all 
configured how I want it, I think, except for one thing. The box in 
question has a vinum RAID-1 array, and I am not sure how I would go 
about using this, preferably without recreating it from scratch - if 
this is even possible - with alot of backup / restore hassle.

I have made an empty vinum RAID-1 array on spare disks and put them in 
th NetBSD box, but I appear to not be able to use them at all. I'm not 
terribly sure what info would be useful in this case, but here's the 
output of disklabel on one of the drives in the empty test RAID-1 array, 
created on FreeBSD-4.11, to get started:

(root@bone2)/home/mrboo# disklabel -r wd1
# /dev/rwd1d:
type: unknown
disk: amnesiac
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 4160
total sectors: 4194225
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
  c:   4194225        63     unused      0     0        # (Cyl.      0*- 
   4160+)
  e:   4194225        63       ADOS      0     0     0  # (Cyl.      0*- 
   4160+)
disklabel: partition c: partition extends past end of unit
disklabel: partition e: partition extends past end of unit

(I'm not sure why it's printing the fstype as ADOS, it's 'vinum' on FreeBSD)

vinum didn't pick up the array automatically when the disks were 
inserted, and I appear not to be able to recreate the configuration as 
there is no 'd' slice. I tried using both wd1 and wd1c instead but:

vinum -> create /root/home
    1: drive wd1 device /dev/wd1c
** 1 : Device not configured
    2: drive wd2 device /dev/wd2c
** 2 : Device not configured
0 drives:
1 volumes:
V home                  State: up       Plexes:       2 Size:          0  B

2 plexes:
P home.p0             C State: up       Subdisks:     1 Size:          0  B
P home.p1             C State: faulty   Subdisks:     1 Size:          0  B

2 subdisks:
S home.p0.s0            State: up       D: wd1          Size:          0  B
S home.p1.s0            State: empty    D: wd2          Size:          0  B


I've read that it's possible to mount an ordinary FreeBSD slice without 
messing with anything at all, but I have heard nothing about vinum with 
FreeBSD slices. I figured maybe these problems were due to the fstype 
being ADOS and not vinum, but as I am getting those 'partition extends 
past end of unit' errors, I am not able to change the fstype.

(root@bone2)/home/mrboo# disklabel -e wd1
disklabel: partition c: partition extends past end of unit
disklabel: partition e: partition extends past end of unit
re-edit the label? [y]: n

Any tips / info etc etc would be very much appreciated! From what I 
gather, vinum is a fairly recent addition to NetBSD. Is it even stable 
enough to use? Are there any known bugs etc? Is anyone out there using 
it with NetBSD successfully, even?

Mark