* Re: SCSI host/channel/lun/part to /dev/sd* or maj/minor mapping
@ 2002-06-14 4:16 Douglas Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2002-06-14 4:16 UTC (permalink / raw)
To: Mark Atwood; +Cc: linux-kernel, linux-scsi, kurt
Mark Atwood write:
> Is there a mapping between the Host,Channel,Id,Lun of a SCSI device as
> reported in /proc/scsi/scsi, and the the /dev/sd* names and/or the
> major/minor device numbers?
>
> I've done some experamentation, and the more obvious ways of doing
> the mapping dont seem to be 100%.
Mark,
There are several utilities discussed at this url:
http://www.torque.net/sg/u_index.html
including scsidev and sg_map. Devfs shows you this mapping
via its hierarchy:
$ ls -l
total 0
brw------- 1 root root 8, 0 Dec 31 1969 disc
crw-r----- 1 root root 21, 0 Dec 31 1969 generic
brw------- 1 root root 8, 1 Dec 31 1969 part1
$ pwd
/dev/scsi/host1/bus0/target0/lun0/
None of these approaches is completely satisfactory. Kurt Garloff
is working on a patch that seems to address this problem quite
cleanly:
$ cat /proc/scsi/map
# C,B,T,U Type onl sg_nm sg_dev nm dev
0,0,00,00 05 1 sg0 c:15:00 sr0 b:0b:00
1,0,01,00 05 1 sg1 c:15:01 sr1 b:0b:01
1,0,03,00 05 1 sg3 c:15:03 sr2 b:0b:02
1,0,05,00 00 1 sg4 c:15:04 sda b:08:00
1,0,09,00 00 1 sg5 c:15:05 sdb b:08:10
1,0,02,00 01 1 sg2 c:15:02 osst0 c:ce:00
2,0,01,00 05 1 sg6 c:15:06 sr3 b:0b:03
2,0,02,00 01 1 sg7 c:15:07 osst1 c:ce:01
2,0,03,00 05 1 sg8 c:15:08 sr4 b:0b:04
2,0,09,00 00 1 sg10 c:15:0a sdd b:08:30
3,0,10,00 00 1 sg11 c:15:0b sde b:08:40
3,0,12,00 00 1 sg12 c:15:0c sdf b:08:50
Doug Gilbert
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH: NEW SUBARCHITECTURE FOR 2.5.21] support for NCR voyager (3/4/5xxx series)
@ 2002-06-14 2:19 Matthew D. Pitts
2002-06-14 2:52 ` SCSI host/channel/lun/part to /dev/sd* or maj/minor mapping Mark Atwood
0 siblings, 1 reply; 2+ messages in thread
From: Matthew D. Pitts @ 2002-06-14 2:19 UTC (permalink / raw)
To: linux-kernel
> > > Sounds quite logical. What does the current patches you have do ?
I've
> > > not had chance to look at them yet.
> > It creates directories `generic' for the standard pc and `visws'. The
voyager
> > patch creates a `voyager' directory. Alternatively, these could be
`mach-pc',
> > `mach-visws' and `mach-voyager'.
>
> Yeah, I think mach-foo would be more aesthetically pleasing, so I'll
> cast my vote for that one. If nothing else, it makes it obvious that
> the subdir isn't important if you don't care about $subarch
>
I think it would be a good idea as well.
Matthew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-14 4:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-14 4:16 SCSI host/channel/lun/part to /dev/sd* or maj/minor mapping Douglas Gilbert
-- strict thread matches above, loose matches on Subject: below --
2002-06-14 2:19 [PATCH: NEW SUBARCHITECTURE FOR 2.5.21] support for NCR voyager (3/4/5xxx series) Matthew D. Pitts
2002-06-14 2:52 ` SCSI host/channel/lun/part to /dev/sd* or maj/minor mapping Mark Atwood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.