Re: scsi disk detection and /dev names, RE: My $.02 on the raging de vfs debate

Guest section DW (dwguest@win.tue.nl)
Mon, 11 Oct 1999 12:46:09 +0200 (MET DST)


> So devfs is a quick workaround of this limitation rather than being a real
> cure (for this particular prob). If anyone with the coding skills is
> listening, it'd be great if static /dev could support location based disk
> names too.

Oh, but those people with coding skills did their work already years ago.
Not many people use this work, but it exists. Eric Youngdale wrote
scsidev. From man scsidev:

DESCRIPTION
scsidev is a utility that is used to guarantee that the
same device node can be used for the same scsi device, no
matter what other scsi devices are added or removed from
the scsi chain. The need for this tool arose because
device numbers are assigned dynamicly at boot time, and if
a new disk were added to the system (or if some disk
didn't spin up), then fixed device nodes would cause the
wrong filesystems to be mounted, checked, etc.

A run produces output

# scsidev
Found scsi device /dev/scsi/sdh23-0c0i4l0 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p1 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p2 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p3 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p4 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p5 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sdh23-0c0i4l0p6 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sgh23-0c0i4l0 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sgh23-0c0i5l0 NCR53c{7,8}xx (rel 17)
Found scsi device /dev/scsi/sgh23-0c0i6l0 NCR53c{7,8}xx (rel 17)
# ls -l /dev/scsi
brw------- 1 root root 8, 0 Oct 11 12:38 sdh23-0c0i4l0
brw------- 1 root root 8, 1 Oct 11 12:38 sdh23-0c0i4l0p1
brw------- 1 root root 8, 2 Oct 11 12:38 sdh23-0c0i4l0p2
brw------- 1 root root 8, 3 Oct 11 12:38 sdh23-0c0i4l0p3
brw------- 1 root root 8, 4 Oct 11 12:38 sdh23-0c0i4l0p4
brw------- 1 root root 8, 5 Oct 11 12:38 sdh23-0c0i4l0p5
brw------- 1 root root 8, 6 Oct 11 12:38 sdh23-0c0i4l0p6
crw------- 1 root root 21, 0 Oct 11 12:38 sgh23-0c0i4l0
crw------- 1 root root 21, 1 Oct 11 12:38 sgh23-0c0i5l0
crw------- 1 root root 21, 2 Oct 11 12:38 sgh23-0c0i6l0
#

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/