vinum is always started at boot-time...

1999-01-17 Thread Ollivier Robert
...regardless of the vinum_slices setting. It is not a nice thing
considering the size of the vinum kld (a6000 bytes).

if [ -n $vinum_slices ] doesn't seem to work.
-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- robe...@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #67: Tue Dec 29 20:24:02 CET 1998


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


Re: vinum is always started at boot-time...

1999-01-17 Thread Gregory Bond
noticed this when it tried to create lotsa devices in a read-only /dev at boot 
time.

Patch:
hellcat## diff -u rc.orig rc
--- rc.orig Mon Jan 18 14:20:49 1999
+++ rc  Mon Jan 18 14:20:59 1999
@@ -27,7 +27,7 @@
ccdconfig -C
 fi
 
-if [ -n $vinum_slices ]; then
+if [ -n $vinum_slices ]; then
if [ -r /modules/vinum.ko ]; then   # jkh paranoia
kldload vinum
vinum read $vinum_slices



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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Monday, 18 January 1999 at  2:15:22 +0100, Ollivier Robert wrote:
 ...regardless of the vinum_slices setting. It is not a nice thing
 considering the size of the vinum kld (a6000 bytes).

 if [ -n $vinum_slices ] doesn't seem to work.

Ugh.  It wants to be

  if [ -n $vinum_slices ]

Fixed.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread まつしたまこと

Sorry donno who set $vinum_slide variable, however,

grog Ugh.  It wants to be
grog   if [ -n $vinum_slices ]

why not do as the CCD do? Anybody have the answer?

if [ -f /etc/vinum.conf ];
vinum create /etc/vinum.conf /dev/null 21
fi

Smart and simple enough?

And, why we should always do kldload the vinum module? Built-in the
vinum module into kernel (say pseudo-device vinum in kernel config
file) is prohibited?

Sorry I do not know how to decide that vinum (or whatever feature) is
already built-in or should be kldload after the kernel starts, but now
we have /boot/loader; pre-loading the modules is quite easy (see the
usage of splash module), and maybe it's not /etc/rc's business.

-- -
Makoto `MAR' MATSUSHITA

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Monday, 18 January 1999 at 13:03:53 +0900, Makoto MATSUSHITA wrote:

 Sorry donno who set $vinum_slide variable, however,

 grog Ugh.  It wants to be
 grog   if [ -n $vinum_slices ]

 why not do as the CCD do? Anybody have the answer?

   if [ -f /etc/vinum.conf ];
   vinum create /etc/vinum.conf /dev/null 21
   fi

 Smart and simple enough?

Because it doesn't work like that.  The config is stored in the disk
labels, not in a static (and not necessarily correct) config file.
The config file is only for the first-time create.

 And, why we should always do kldload the vinum module? 

Because I believe that's the correct way to do it.

 Built-in the vinum module into kernel (say pseudo-device vinum in
 kernel config file) is prohibited?

Currently, yes.  Peter put in hooks to statically configure Vinum, but
THEY ARE NOT TESTED.  Not at all.  Please don't use them, or if you
do, tell me only about the fixes you make.

 Sorry I do not know how to decide that vinum (or whatever feature)
 is already built-in or should be kldload after the kernel starts,
 but now we have /boot/loader; pre-loading the modules is quite easy
 (see the usage of splash module), and maybe it's not /etc/rc's
 business.

That's a valid point.  When the bootstrap stops moving long enough for
me to catch it, I'll look at that.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread まつしたまこと

grog Because it doesn't work like that.  The config is stored in the
grog disk labels, not in a static (and not necessarily correct)
grog config file.  The config file is only for the first-time create.

O.K. I understand (not 'vinum create' but 'vinum read'). Would you
please ('cause I don't know :-) how to set the vinum_slice variable?
We don't include /etc/rc.conf in such an early stage of /etc/rc...

grog Currently, yes.  Peter put in hooks to statically configure
grog Vinum, but THEY ARE NOT TESTED.  Not at all.  Please don't use
grog them, or if you do, tell me only about the fixes you make.

Hmm, I've used vinum without module (built-in the kernel). It works
for a week... Anyway, I'll stop it and switch to kldloading... thank you.

-- -
Makoto `MAR' MATSUSHITA

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Monday, 18 January 1999 at 13:51:57 +0900, Makoto MATSUSHITA wrote:

 grog Because it doesn't work like that.  The config is stored in the
 grog disk labels, not in a static (and not necessarily correct)
 grog config file.  The config file is only for the first-time create.

 O.K. I understand (not 'vinum create' but 'vinum read'). Would you
 please ('cause I don't know :-) how to set the vinum_slice variable?
 We don't include /etc/rc.conf in such an early stage of /etc/rc...

Oops.  This was a thoroughly successful commit, wasn't it?  At least
it didn't break `make world'.

I'll think out another way and test more thoroughly.  How does this
look?

if [ -f /etc/vinumslices ]; then
read /etc/vinumslices
if [ -r /modules/vinum.ko ]; then   # jkh paranoia
kldload vinum
vinum read $vinum_slices
else
echo Can't find /modules/vinum.ko
fi
fi

 grog Currently, yes.  Peter put in hooks to statically configure
 grog Vinum, but THEY ARE NOT TESTED.  Not at all.  Please don't use
 grog them, or if you do, tell me only about the fixes you make.

 Hmm, I've used vinum without module (built-in the kernel). It works
 for a week... Anyway, I'll stop it and switch to kldloading... thank you.

OK, I take that back.  You can also tell me about your successes :-)

There's still one way you can shoot yourself in the foot with
statically configured Vinum: unless you specify VINUMDEBUG, you can
find yourself out of sync with Vinum(8): they pass structures via
ioctl, and some of the structures include debugging information.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Makoto MATSUSHITA

grog I'll think out another way and test more thoroughly.  How does this
grog look?

g...@itga.com.au already pointed out that vinum read command in such
an early stage of /etc/rc causes much much warnings about /dev/ is
read-only filesystem. And, a typo around reading from /etc/vinumslices
(I don't want to type every time :-).

Anyway, I do try with this:

if [ -f /etc/vinumslices ]; then
read vinum_slices  /etc/vinumslices
if [ -r /modules/vinum.ko ]; then   # jkh paranoia
kldload vinum
vinum read $vinum_slices /dev/null 21
else
echo Can't find /modules/vinum.ko
fi
fi

It works fine, however, sorry I have only ONE volume so how it goes if
two or more volumes are defined (note that 'vinum read' takes only one
argument). If more 'vinum read' commands should be done, the commands
should be within for-loop.

-- -
Makoto `MAR' MATSUSHITA

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Jake
 Oops.  This was a thoroughly successful commit, wasn't it?  At least
 it didn't break `make world'.

:)

 
 I'll think out another way and test more thoroughly.  How does this
 look?
 
 if [ -f /etc/vinumslices ]; then
   read /etc/vinumslices
   if [ -r /modules/vinum.ko ]; then   # jkh paranoia
   kldload vinum
   vinum read $vinum_slices
   else
   echo Can't find /modules/vinum.ko
   fi
 fi
 

Why not just suck in rc.conf before starting vinum?

I've modified my /etc/rc to do this, and it works fine.
I submitted a PR with a patch.

also, I tried 'pseudo-device vinum' and it does work, 
but I think I ran into trouble somewhere.  
Oh yeah, it worked once, but each subsequent 
reboot seemed to replicate my subdisks, 
until I had about 16, only two of which were real.
Finally I found my config file, recreated and switched
back to the kld.

FWIW I think its good to load the module from /etc/rc
rather than loader.rc, keeps all the vinum stuff in one
place.  Maybe we could even have the module loaded
on demand; ie if you try to run vinum before the module
is loaded, load it automatically.

Cheers 


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


Re: vinum is always started at boot-time...

1999-01-17 Thread まつしたまこと

matusita It works fine, however, sorry I have only ONE volume so how
matusita it goes if two or more volumes are defined (note that 'vinum
matusita read' takes only one argument).

And, this code causes *duplicate* vinum information, if we do shutdown
to single-user mode and then try to come back to the multi-user world
(this causes to rerun /etc/rc, rerun 'vinum read' command, and dup them).

Somebody may say that's bad...

-- -
Makoto `MAR' MATSUSHITA

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Monday, 18 January 1999 at 15:15:09 +0900, Makoto MATSUSHITA wrote:

 matusita It works fine, however, sorry I have only ONE volume so how
 matusita it goes if two or more volumes are defined (note that 'vinum
 matusita read' takes only one argument).

 And, this code causes *duplicate* vinum information, if we do shutdown
 to single-user mode and then try to come back to the multi-user world
 (this causes to rerun /etc/rc, rerun 'vinum read' command, and dup them).

There is a bug in the current version of Vinum which would allow this,
but it's been fixed in the new megacommit I'm preparing.  For example:

Jan 18 15:36:36 panic /kernel: vinum: reading configuration from /dev/sd4h
Jan 18 15:36:37 panic /kernel: vinum: updating configuration from /dev/sd3h
Jan 18 15:36:38 panic /kernel: vinum: updating configuration from /dev/sd2h
Jan 18 15:36:39 panic /kernel: vinum: updating configuration from /dev/sd1h
Jan 18 15:38:35 panic /kernel: vinum: already read config from drive1
Jan 18 15:38:35 panic /kernel: vinum: already read config from drive2
Jan 18 15:38:35 panic /kernel: vinum: already read config from drive3
Jan 18 15:38:35 panic /kernel: vinum: already read config from drive4

Don't worry about the panic; that's the name of the system :-)

You'll also notice that the order of reading is not the order in which
the names are specified; Vinum starts with the newest config and works
back.

 Somebody may say that's bad...

If you've tripped over the bug, `bad' is an understatement.  It can
completely tear your config apart.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Sunday, 17 January 1999 at 22:17:21 -0800, Jake wrote:
 Oops.  This was a thoroughly successful commit, wasn't it?  At least
 it didn't break `make world'.

 :)


 I'll think out another way and test more thoroughly.  How does this
 look?

 if [ -f /etc/vinumslices ]; then
  read /etc/vinumslices
  if [ -r /modules/vinum.ko ]; then   # jkh paranoia
  kldload vinum
  vinum read $vinum_slices
  else
  echo Can't find /modules/vinum.ko
  fi
 fi


 Why not just suck in rc.conf before starting vinum?

Good idea.  Does anybody have a reason for reading in rc.conf so late?

 I've modified my /etc/rc to do this, and it works fine.
 I submitted a PR with a patch.

I'll look at it.

 also, I tried 'pseudo-device vinum' and it does work,
 but I think I ran into trouble somewhere.
 Oh yeah, it worked once, but each subsequent
 reboot seemed to replicate my subdisks,
 until I had about 16, only two of which were real.
 Finally I found my config file, recreated and switched
 back to the kld.

I don't think this is the fault of the pseudo-device.  This is more
likely to be the bug I mentioned in my mail to Matsushita-san.

 FWIW I think its good to load the module from /etc/rc
 rather than loader.rc, keeps all the vinum stuff in one
 place.  Maybe we could even have the module loaded
 on demand; ie if you try to run vinum before the module
 is loaded, load it automatically.

Once I have this update out of my hair, I'll think about this.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Greg Lehey
On Monday, 18 January 1999 at 15:19:34 +0900, Makoto MATSUSHITA wrote:

 grog I'll think out another way and test more thoroughly.  How does this
 grog look?

 g...@itga.com.au already pointed out that vinum read command in such
 an early stage of /etc/rc causes much much warnings about /dev/ is
 read-only filesystem.

We can get rid of the warnings.  And they'll go away by themselves
when we have devfs.

 And, a typo around reading from /etc/vinumslices
 (I don't want to type every time :-).

 Anyway, I do try with this:

 if [ -f /etc/vinumslices ]; then
   read vinum_slices  /etc/vinumslices
   if [ -r /modules/vinum.ko ]; then   # jkh paranoia
   kldload vinum
   vinum read $vinum_slices /dev/null 21
   else
   echo Can't find /modules/vinum.ko
   fi
 fi

 It works fine, however, sorry I have only ONE volume so how it goes if
 two or more volumes are defined (note that 'vinum read' takes only one
 argument).

The syntax for `vinum read' is changing.  It now *must* specify all
drives (not volumes).  You can lie and specify others, too, if you
want: it will silently ignore any drives which don't contain Vinum
data.  We need to do it like this in order to read in the config in
the correct order after a crash.

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

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


Re: vinum is always started at boot-time...

1999-01-17 Thread Jordan K. Hubbard
Greg left out the quotes from my example. :)

 ...regardless of the vinum_slices setting. It is not a nice thing
 considering the size of the vinum kld (a6000 bytes).
 
 if [ -n $vinum_slices ] doesn't seem to work.
 -- 
 Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- robe...@keltia.freenix.f
r
 FreeBSD keltia.freenix.fr 3.0-CURRENT #67: Tue Dec 29 20:24:02 CET 1998
 
 
 To Unsubscribe: send mail to majord...@freebsd.org
 with unsubscribe freebsd-current in the body of the message


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