sd - SCSI disk and ATAPI/SCSI CD-ROM device driver
sd@target,lun:partition
To open a device without checking if the vtoc is valid, use the O_NDELAY flag. When the device is opened using O_NDELAY, the first read or write to the device that happens after the open results in the label being read if the label is not currently valid. Once read, the label remains valid until the last close of the device. Except for reading the label, O_NDELAY has no impact on the driver.
The sd SCSI and SCSI/ATAPI driver supports embedded SCSI-2 and CCS-compatible SCSI disk and CD-ROM drives, ATAPI 2.6 (SFF-8020i)-compliant CD-ROM drives, SFF-8090-compliant SCSI/ATAPI DVD-ROM drives, IOMEGA SCSI/ATAPI ZIP drives, SCSI JAZ drives, and USB mass storage devices (refer to scsa2usb(7D)).
To determine the disk drive type, use the SCSI/ATAPI inquiry command and read the volume label stored on block 0 of the drive. (The volume label describes the disk geometry and partitioning and must be present for the disk to be mounted by the system.) A volume label is not required for removable, re-writable or read-only media.
The sd driver supports embedded SCSI-2 and CCS-compatible SCSI disk and CD-ROM drives, ATAPI 2.6 (SFF-8020i)-compliant CD-ROM drives, SFF-8090-compliant SCSI/ATAPI DVD-ROM drives, IOMEGA SCSI/ATAPI ZIP drives, and SCSI JAZ drives.
The x86 BIOS legacy requires a master boot record (MBR) and fdisk table in the first physical sector of the bootable media. If the x86 hard disk contains a Solaris disk label, it is located in the second 512-byte sector of the FDISK partition.
Block-files access the disk using normal buffering mechanism and are read-from and written-to without regard to physical disk records. A "raw" interface enables direct transmission between the disk and the user's read or write buffer. A single read or write call usually results in a single I/O operation, therefore raw I/O is more efficient when many bytes are transmitted. Block files names are found in /dev/dsk; raw file names are found in /dev/rdsk.
I/O requests to the raw device must be aligned on a 512-byte (DEV_BSIZE) boundary and all I/O request lengths must be in multiples of 512 bytes. Requests that do not meet these requirements will trigger an EINVAL error. There are no alignment or length restrictions on I/O requests to the block device.
A CD-ROM disk is single-sided and contains approximately 640 megabytes of data or 74 minutes of audio. When the CD-ROM is opened, the eject button is disabled to prevent manual removal of the disk until the last close() is called. No volume label is required for a CD-ROM. The disk geometry and partitioning information are constant and never change. If the CD-ROM contains data recorded in a Solaris-aware file system format, it can be mounted using the appropriate Solaris file system support.
DVD-ROM media can be single or double-sided and can be recorded upon using a single or double layer structure. Double-layer media provides parallel or opposite track paths. A DVD-ROM can hold from between 4.5 Gbytes and 17 Gbytes of data, depending on the layer structure used for recording
and if the DVD-ROM is single or double-sided.
When the DVD-ROM is opened, the eject button is disabled to prevent the manual removal of a disk until the last close() is called. No volume label is required for a DVD-ROM. If the DVD-ROM contains data recorded in a Solaris-aware file system format, it can be mounted using the appropriate Solaris file system support.
ZIP/JAZ media provide varied data capacity points; a single JAZ drive can store up to 2 GBytes of data, while a ZIP-250 can store up to 250MBytes of data. ZIP/JAZ drives can be read-from or written-to using the appropriate drive.
When a ZIP/JAZ drive is opened, the eject button is disabled to prevent the manual removal of a disk until the last close() is called. No volume label is required for a ZIP/JAZ drive. If the ZIP/JAZ drive contains data recorded in a Solaris-aware file system format, it can be mounted using the appropriate Solaris file system support.
Each device maintains I/O statistics for the device and for partitions allocated for that device. For each device/partition, the driver accumulates reads, writes, bytes read, and bytes written. The driver also initiates hi-resolution time stamps at queue entry and exit points to enable monitoring of residence time and cumulative residence-length product for each queue.
Not all device drivers make per-partition IO statistics available for reporting. sd and ssd(7D) per-partition statistics are enabled by default but may disabled in their configuration files.
Refer to dkio(7I), and cdio(7I)
EACCES
EBUSY
EFAULT
EINVAL
ENOTTY
ENXIO
EROFS
EAGAIN
EINTR
ENOMEM
EPERM
EIO
The sd driver can be configured by defining properties in the sd.conf file. The sd driver supports the following properties:
enable-partition-kstats
qfull-retries
qfull-retry-interval
allow-bus-device-reset
optical-device-bind
In addition to the above properties, some device-specific tunables can be configured in sd.conf using the 'sd-config-list' global property. The value of this property is a list of duplets. The formal syntax is:
sd-config-list = <duplet> [, <duplet> ]* ; where <duplet>:= "<vid+pid>" , "<tunable-list>" and <tunable-list>:= <tunable> [, <tunable> ]*; <tunable> = <name> : <value> The <vid+pid> is the string that is returned by the target device on a SCSI inquiry command. The <tunable-list> contains one or more tunables to apply to all target devices with the specified <vid+pid>. Each <tunable> is a <name> : <value> pair. Supported tunable names are: delay-busy: when busy, nsecs of delay before retry. retries-timeout: retries to perform on an IO timeout.
The following is an example of a global sd-config-list property: sd-config-list = "SUN T4", "delay-busy:600, retries-timeout:6", "SUN StorEdge_3510", "retries-timeout:3";
/kernel/drv/sd.conf
/dev/dsk/cntndnsn
/dev/rdsk/cntndnsn
Where:
cn
tn
dn
sn
/dev/rdsk/cntndnpn
Where:
pn
sar(1), cfgadm_scsi(1M), fdisk(1M), format(1M), iostat(1M), close(2), ioctl(2), lseek(2), read(2), write(2), driver.conf(4), scsi(4), filesystem(5), scsa2usb(7D), ssd(7D), hsfs(7FS), pcfs(7FS), udfs(7FS), cdio(7I), dkio(7I), scsi_ifsetcap(9F), scsi_reset(9F)
ANSI Small Computer System Interface-2 (SCSI-2)
ATA Packet Interface for CD-ROMs, SFF-8020i
Mt.Fuji Commands for CD and DVD, SFF8090v3
http://www.sun.com/io
Error for Command:'<command name>' Error Level: Fatal Requested Block: <n> Error Block: <m> Vendor:'<vendorname>' Serial Number:'<serial number>' Sense Key:<sense key name>
ASC: 0x<a> (<ASC name>), ASCQ: 0x<b>, FRU: 0x<c>
Caddy not inserted in drive
Check Condition on REQUEST SENSE
Label says <m> blocks Drive says <n> blocks
Not enough sense information
Request Sense couldn't get sense data
Reservation Conflict
SCSI transport failed: reason 'xxxx': {retrying|giving up}
Unhandled Sense Key<n>
Unit not ready. Additional sense code 0x
Can't do switch back to mode 1
Corrupt label - bad geometry
Corrupt label - label checksum failed
Corrupt label - wrong magic number
Device busy too long
Disk not responding to selection
Failed to handle UA
I/O to invalid geometry
Incomplete read/write - retrying/giving up
No bp for direct access device format geometry
No bp for disk label
No bp for fdisk
No bp for rigid disk geometry
No mem for property
No memory for direct access device format geometry
No memory for disk label
No memory for rigid disk geometry
No resources for dumping
Offline
Requeue of command fails
sdrestart transport failed()
Transfer length not modulo
Transport of request sense fails()
Transport rejected()
Unable to read label
Unit does not respond to selection
DVD-ROM media containing DVD-Video data may follow/adhere to the requirements of content scrambling system or copy protection scheme. Reading of copy-protected sector will cause I/O error. Users are advised to use the appropriate playback software to view video contents on DVD-ROM media containing DVD-Video data.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |