| 1 |
In Solaris, SCSI device names below the '/dev' directory have a |
| 2 |
form like: c5t4d3s2 where the number following "c" is the controller |
| 3 |
(HBA) number, the number following "t" is the target number (from |
| 4 |
the SCSI parallel interface days) and the number following "d" is |
| 5 |
the LUN. Following the "s" is the slice number which is related to |
| 6 |
a partition and by convention "s2" is the whole disk. |
| 7 |
|
| 8 |
OpenSolaris also has a c5t4d3p2 form where the number following |
| 9 |
the "p" is the partition number apart from "p0" which is the whole |
| 10 |
disk. So a whole disk may be referred to as either: |
| 11 |
- c5t4d3 |
| 12 |
- c5t4d3s2 |
| 13 |
- c5t4d3p0 |
| 14 |
|
| 15 |
And these device names are duplicated in the /dev/dsk and /dev/rdsk |
| 16 |
directories. The former is the block device name and the latter |
| 17 |
is for "raw" (or char device) access. For performance and flexibility |
| 18 |
it is better for ddpt to use the raw device names (e.g. |
| 19 |
/dev/rdsk/c5t4d3p0). A safe way to check things is: |
| 20 |
ddpt if=/dev/rdsk/c5t4d3p0 bs=512 count=0 verbose=4 |
| 21 |
If it did read anything (it won't due to the "count=0") the |
| 22 |
normal Unix read() call would be used. To do the same thing at the |
| 23 |
SCSI pass-through level: |
| 24 |
ddpt if=/dev/rdsk/c5t4d3p0 iflag=pt bs=512 count=0 verbose=4 |
| 25 |
The latter won't work on the /dev/dsk/c5t4d3p0 variant device name |
| 26 |
resulting in an inappropriate ioctl for device error. |
| 27 |
|
| 28 |
The device names within the /dev directory are typically symbolic |
| 29 |
links to much longer topological names in the /device directory. |
| 30 |
|
| 31 |
In Solaris cd/dvd/bd players seem to be treated as disks and so are |
| 32 |
found in the /dev/rdsk directory. |
| 33 |
|
| 34 |
There is also a sgen (SCSI generic) driver which by default does not |
| 35 |
attach to any device. See the /kernel/drv/sgen.conf file to control |
| 36 |
what is attached. Any attached device will have a device name of |
| 37 |
the form /dev/scsi/c5t4d3 . |
| 38 |
|
| 39 |
Listing available SCSI devices in Solaris seems to be a challenge. |
| 40 |
"Use the 'format' command" advice works but seems a very dangerous |
| 41 |
way to list devices. [It does prompt again before doing any damage.] |
| 42 |
'devfsadm -Cv' cleans out the clutter in the /dev/rdsk directory, |
| 43 |
only leaving what is "live". The "cfgadm -v" command looks promising. |
| 44 |
|
| 45 |
|
| 46 |
8th April 2010 |