Re: Setting SCSI bus options before reaching fsck at boot time
On Fri, Nov 12, 2004 at 11:28:18PM -0600, Dan Nelson wrote: In the last episode (Nov 12), Tillman Hodgson said: I'd like to find a way to have camcontrol (or some other mechanism) set the SCSI bus speed on this particular SCSI chain early in the boot process, /before/ it encounters fsck and thus trips over it's own feet in bus resets. Since camcontrol is in /sbin, you can just add a line to the top of /etc/rc. A cleaner solution would be to write a small /etc/rc.d/ script and add a BEFORE: fsck line so it gets run before fsck. That seemed like a reasonable approach, so I took a stab at it. Unfortunately, I haven't worked with custom RCng scripts before and I can't seem to get the script to run. Here's what I have (blank lines removed to save some space): #!/bin/sh # # PROVIDE: camcontrol_start # REQUIRE: disks # BEFORE: bgfsck . /etc/rc.subr name=camcontrol_tillman rcvar=`set rcvar` start_cmd=camcontrol_start stop_cmd=: camcontrol_start() { echo -n camcontrol_tillman has started echo -n da0 camcontrol negotiate da0 -R10 -a -q ... (repeated for da1 through da6 (it's a 7 bay JBOD tower)) ... info camcontrol_tillman has finished } load_rc_config $name run_rc_command $1 I also have the following in /etc/rc.conf: ### Tillmans custom RCng scripts camcontrol_tillman_enable=YES When I run the following by hand, it works: [EMAIL PROTECTED] camcontrol negotiate da6 | grep freq (pass6:sym1:0:6:0): frequency: 20.000MHz [EMAIL PROTECTED] camcontrol negotiate da6 -R10 -q -a [EMAIL PROTECTED] camcontrol negotiate da6 | grep freq (pass6:sym1:0:6:0): frequency: 10.000MHz Yet when I run `/etc/rc.d/camcontrol_tillman start` (or even forcestart), all I get is: [EMAIL PROTECTED] /etc/rc.d/camcontrol_tillman forcestart # camcontrol_tillman Aside from the echo statements not outputting anything, a quick check confirms that it really didn't do anything: [EMAIL PROTECTED] camcontrol neg da5 | grep freq (pass5:sym1:0:5:0): frequency: 20.000MHz I'm assuming that I just don't understand something relatively simple about the RCng system and that the script is missing something relatively minor. Anyone care to enlighten me? -T -- The important thing is not to stop questioning. Curiosity has its own reason for existing. -- Albert Einstein ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Setting SCSI bus options before reaching fsck at boot time
Howdy foilks, I have a SCSI controller (the external 68-pin high density connector on a Compaq Proliant 1600) that seems to ignore it's own settings when I through its bus speed down. This is a problem, as I'm running into /many/ SCSI bus reset problems with this ancient DEC 7-bay JBOD tower that I'm playing with. The problems go away when I use `camcontrol negotiate -R 10 da0` to drop the bus freq to 10MHz from 20MHz and I'd hope to simply set the controller to that speed. No love, sigh. FreeBSD comes up at the drives are 20MHz: da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing Enabled I'd like to find a way to have camcontrol (or some other mechanism) set the SCSI bus speed on this particular SCSI chain early in the boot process, /before/ it encounters fsck and thus trips over it's own feet in bus resets. If it matters, the SCSI controller shows in dmesg as: sym1: 875 port 0x3400-0x34ff mem 0xc6efe000-0xc6efefff,0xc6efde00-0xc6efdeff irq 10 at device 9.1 on pci1 sym1: No NVRAM, ID 7, Fast-20, SE, parity checking sym1: [GIANT-LOCKED] Any pointers? -T -- Keeping UUCP running is starting to seem a lot like keeping a 130-year- old man who smokes 4 packs a day on life support because he's the last person on Earth who knows how to do the cha-cha, but he won't tell anyone. - A.S.R. quote (Ryan Tucker) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Setting SCSI bus options before reaching fsck at boot time
In the last episode (Nov 12), Tillman Hodgson said: I have a SCSI controller (the external 68-pin high density connector on a Compaq Proliant 1600) that seems to ignore it's own settings when I through its bus speed down. This is a problem, as I'm running into /many/ SCSI bus reset problems with this ancient DEC 7-bay JBOD tower that I'm playing with. The problems go away when I use `camcontrol negotiate -R 10 da0` to drop the bus freq to 10MHz from 20MHz and I'd hope to simply set the controller to that speed. No love, sigh. FreeBSD comes up at the drives are 20MHz: da0: 40.000MB/s transfers (20.000MHz, offset 15, 16bit), Tagged Queueing Enabled I'd like to find a way to have camcontrol (or some other mechanism) set the SCSI bus speed on this particular SCSI chain early in the boot process, /before/ it encounters fsck and thus trips over it's own feet in bus resets. If it matters, the SCSI controller shows in dmesg as: sym1: 875 port 0x3400-0x34ff mem 0xc6efe000-0xc6efefff,0xc6efde00-0xc6efdeff irq 10 at device 9.1 on pci1 sym1: No NVRAM, ID 7, Fast-20, SE, parity checking sym1: [GIANT-LOCKED] Any pointers? Since camcontrol is in /sbin, you can just add a line to the top of /etc/rc. A cleaner solution would be to write a small /etc/rc.d/ script and add a BEFORE: fsck line so it gets run before fsck. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]