
couple of years ago i got my hand on 2 scsi-towers from digital .. each with 62gig discs .. nowadays you smile above such small amount of storage but at that time .. wow :) anyway, its perfect to make backups. since i changed the backupserver from linux to openbsd i needed something to access the scsi-discs pretty dynamicly
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. furthermore: those old towers are pretty noisy which is the main reason why i want to have them disabled most of the time.
the box in questions has an ahc*-scsi-controler and one internal 4gig-disc (sd6), sd0-5 are 6×2gig dec-scsis-discs, the box (“devil”) itself is running openbsd3.5 on a pentium128 with 128megs of ram.
but how to switch them on again while running the backupbox already and have valid device-entries? under linux i found a tool called scsi-idle which does the job pretty well. but in openbsd?
so, here is how i did it:
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
rebboot the machine with scsi-tower off and wait till its completly up and running. switch the scsi-tower on, wait till it gets completly ready (with spinning the discs up etc)
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.
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.
cheers, akira
h3 update
the box is now running with freebsd5.3 and things got a little bit easier, thanx to devfs (dynamic creation of /dev/ – entries and thanx^2 to camcontrol, which makes the rescanning of the bus a lot easier:
$> camcontrol rescan all
you wont even need to configure the kernel to achieve that :)
| darkshed.net is powered by textpattern, all content is © by m.gumz 2001 - 2018 | rss |