vinum setup
Sven Willenberger
sven at dmv.com
Tue Apr 12 16:04:31 PDT 2005
On Tue, 2005-04-12 at 22:34 +0000, Chuck Robey wrote:
> Sven Willenberger wrote:
> > On Tue, 2005-04-12 at 20:44 +0000, Chuck Robey wrote:
> >
> >>I just asked this on -questions, but I think I shouldn't have, it's a
> >>amd64 question ... I am having a miserable time trying to get vinum
> >>working on m y dual opteron system, does anyone know, does vinum work on
> >> amd64? I can't even include "device vinum" in the config file ...
> >>
> >
> >
> > afaik, all the vinum has been ported to gvinum ...
> >
> > /boot/loader.conf
> > geom_vinum_load="YES" # Concatenated/mirror/raid driver
> >
> > nothing is needed in the kernel/conf file
> >
> > I have not tried gvinum with amd64 but on the i386 systems there are a
> > couple of gotchas I found. After creating the array I find it necessarey
> > to gvinum saveconfig or it will not be recognized on reboot. Also some
> > of the commands do not work yet. If you are not using gvinum instead of
> > vinum, I would start there and see how it goes ...
> >
> > Sven
> >
>
> Sven, if seems like 90% of the gvinum commands don't work ... they just
> yield "unknown command" which isn't helpful. Three questions would help
> me, so I'll ask them.
>
> 1) how do I erase the existing screwed up config? Reconfig is naturally
> one of the commands that isn't recognized.
>
> 2) for the subdisk command, the "length" parameter, I can't tell if this
> means the entire size of the subdisk, or is it possibly got something to
> do with the size of the mirroring bites?
>
> 3) I can't seem to attach the subdisks to the volume or plex, so the
> volume/plex size remains 0. Again, "attach" isn't recognized). The
> only way I have done things so far is to put stuff into the config file,
> and use "create" to read that. How do I attach a subdisk to a plex or
> volume?
>
Based on the source code (/usr/src/sbin/gvinum/gvinum.c) it would appear
that gvinum supports the following commands:
void gvinum_cancelinit(int, char **);
void gvinum_create(int, char **);
void gvinum_help(void);
void gvinum_init(int, char **);
void gvinum_list(int, char **);
void gvinum_parityop(int, char **, int);
void gvinum_printconfig(int, char **);
void gvinum_rm(int, char **);
void gvinum_saveconfig(void);
void gvinum_setstate(int, char **);
void gvinum_start(int, char **);
void gvinum_stop(int, char **);
void parseline(int, char **);
void printconfig(FILE *, char *);
I generally do all my configurations using the file (gvinum create
<filename>) as I too find the commandline very limited. As far as
resetconfig, the only way I have found to successfully emulate this is
to
a) dd if=/dev/null of=/dev/<specific drive> bs=1k count=32
b) fdisk /dev/<thedrive>
c) bsdlabel /dev/<thedrive><theslice>
Generally the length is the size of the subdisk you are creating for the
plex, if left off or set to 0 (according the vinum manpage) it will use
all the available space on the drive you specify. I use the entire
subdisk I specify so I leave off the length command. My file, for
example just leaves of the length information.
Here is what I did to create a mirror of stripes using 4 drives:
# bsdlabel /dev/da1s1
# /dev/da1s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
c: 71681967 0 unused 0 0 # "raw" part,
don't edit
h: 71681951 16 vinum
# cat home.vinum
drive a device /dev/da1s1h
drive b device /dev/da2s1h
drive c device /dev/da3s1h
drive d device /dev/da4s1h
volume home
plex org striped 480k
sd drive a
sd drive b
plex org striped 480k
sd drive c
sd drive d
# gvinum create home.vinum
# gvinum l
4 drives:
D d State: up /dev/da4s1h A: 0/35000 MB
(0%)
D c State: up /dev/da3s1h A: 0/35000 MB
(0%)
D b State: up /dev/da2s1h A: 0/35000 MB
(0%)
D a State: up /dev/da1s1h A: 0/35000 MB
(0%)
1 volume:
V home State: up Plexes: 2 Size: 68
GB
2 plexes:
P home.p0 S State: up Subdisks: 2 Size: 68
GB
P home.p1 S State: up Subdisks: 2 Size: 68
GB
4 subdisks:
S home.p0.s0 State: up D: a Size: 34
GB
S home.p0.s1 State: up D: b Size: 34
GB
S home.p1.s0 State: up D: c Size: 34
GB
S home.p1.s1 State: up D: d Size: 34
GB
# gvinum saveconfig
# newfs /dev/gvinum/home
# fsck -n -t ufs /dev/gvinum/home
Sven
More information about the freebsd-amd64
mailing list