-+------------------------------------------------------------------+- openbsd and a scsi-tower -+------------------------------------------------------------------+- this is written coz i fighted my tiny openbsdbox quite some time to handle the scsi-tower with its 6x2gig discs the way i wanted. situation: _____ |sd0| | 1| | 2| | 3| | 4| ___________ | 5| |devil|sd6| ======-----=========== sd0-5 are 6x2gig dec-scsis-discs, plan is to use them for regular backups of my stuff, should be big enough to handle this. the box (devil) itself is running openbsd3.5 on a pentium128 with 128megs of ram. sometimes i use this machine just for surfing (console mode) when my gf uses my machine. so i dont want to have the scsi-tower ALWAYS enabled at boottime, sometimes i want to enable it at runtime, store the stuff, sync everything and disable the scsi-tower again. so here is how to do this: 1. teach the kernel how to number things right. in default mode the kernel assumes the first found disc is /dev/sd0 and so on. that might be true in most cases but not in this one. i want have bus0 target0 lun0 always be /dev/sd0 and target6 should be /dev/sd6. otherwise the system has problems with booting since the (internal) 4gig-disc on target6 becomes /dev/sd0 if the tower is off and /dev/sd6 if the tower is enabled. this sux :) so: config -e /bsd -o /bsd.scsi and wire down the entries for the scsi-discs. when you are in the config-console type "help" and use the "change" command to do the things. perhaps you need "add" too for adding the specific entries. i removed every unneeded scsi-stuff from the kernel and put (for example) ahc0 to scsibus0. try out that new kernel and see if devices remain the same if booted with enabled/disabled scsi-tower 2. boot the machine with scsi-tower off. 3. switch the scsi-tower on, wait till it gets completly ready. 4. enter: scsi -f /dev/rsd6c -r to rescan the bus. the kernel should now recognize the new discs and connect the hardare to the right "/dev"-entries. you need to run the command on a working scsi device otherwise you ll get an io-error. some docs say something about /dev/scsi but till now i didnt figure out how to enable this super-device. 5. to disable the discs: scsi -f /dev/rsd0c -v -c "1b 0 0 0 0 0" for each disc. this results in some errors from the kernel but it worked and the discs spin down. after that you can turnoff your scsi-tower. a final scsi -f /dev/rsd6c -r shoould bring the kernel in sync with the current situation. happy scsiing, mathias(akira)