Re: re-detect SCSi bus?

Richard B. Johnson (root@chaos.analogic.com)
Wed, 18 Mar 1998 15:35:43 -0500 (EST)


On Wed, 18 Mar 1998, Doug Crompton wrote:

> On Wed, 18 Mar 1998, Lech Szychowski wrote:
>
> > > SCSI module is just not an option. If anyone knows where to grab docs on
> > > doing a rescan (even a hacked one) I'd appreciate it (I'm hoping to get as
> >
> > Well, feel free to correct me if I'm wrong, but drivers/scsi/scsi.c
> > already specifies/supports such functionality:
> >
> > /*
> > * Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
> > * with "0 1 2 3" replaced by your "Host Channel Id Lun".
> > * Consider this feature BETA.
> > * CAUTION: This is not for hotplugging your peripherals. As
> > * SCSI was not designed for this you could damage your
> > * hardware !
>
> YES YES - I know all this I have been following it here. We know we can
> use /proc to diddle individual SCSI ID's. My point was that this was a
> rather (possibly) dangerous way to do it. I was thinking of something
> more removed from the inards for a less? guru operator. I don't wana know
> boards,channels,id's - I wanna turn on a device and say find it.
>

But you apparently are not aware that the write to /proc can come from
a modified version of mount. You can force an existing device to be
properly dismounted before you substitute it also. The existing kernel
interface via /proc is really all you need. Note, when you do `ps`,
the information displayed comes from the /proc file-system. Same with
`top` and other user-mode utilities. `umount` no longer has to keep
a possibly-wrong text file of the mounted file-systems in /etc/mtab
because the real information is now in the /proc file-system. The
/proc file-system is one of the most important ways for user-mode
code to interface with the kernel. /proc/sys/net/ipv4 has zillions
of tunable network parameters that many haven't discovered yet!

Linux nicely made the /proc file-system human-readable. SunOs doesn't.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.87 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu