2 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER,
5 .\" with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SD 7D "May 13, 2017"
8 sd \- SCSI disk and ATAPI/SCSI CD-ROM device driver
12 \fBsd@target,lun:partition\fR
17 To open a device without checking if the vtoc is valid, use the O_NDELAY flag.
18 When the device is opened using O_NDELAY, the first read or write to the device
19 that happens after the open results in the label being read if the label is not
20 currently valid. Once read, the label remains valid until the last close of the
21 device. Except for reading the label, O_NDELAY has no impact on the driver.
24 The \fBsd\fR \fBSCSI\fR and \fBSCSI/ATAPI\fR driver supports embedded
25 \fBSCSI\fR-2 and \fBCCS\fR-compatible \fBSCSI\fR disk and CD-ROM drives,
26 \fBATAPI \fR 2.6 (SFF-8020i)-compliant CD-ROM drives, SFF-8090-compliant
27 \fBSCSI/ATAPI\fR DVD-ROM drives, IOMEGA \fBSCSI/ATAPI\fR ZIP drives, \fBSCSI
28 JAZ\fR drives, and USB mass storage devices (refer to \fBscsa2usb\fR(7D)).
31 To determine the disk drive type, use the \fBSCSI/ATAPI\fR inquiry command and
32 read the volume label stored on block 0 of the drive. (The volume label
33 describes the disk geometry and partitioning and must be present for the disk
34 to be mounted by the system.) A volume label is not required for removable,
35 re-writable or read-only media.
38 The \fBsd\fRdriver supports embedded \fBSCSI\fR-2 and \fBCCS\fR-compatible
39 \fBSCSI \fRdisk and CD-ROM drives, \fBATAPI \fR2.6 (SFF-8020i)-compliant CD-ROM
40 drives, SFF-8090-compliant \fBSCSI/ATAPI\fR DVD-ROM drives, IOMEGA
41 \fBSCSI/ATAPI\fR ZIP drives\fB, and SCSI JAZ\fR drives.
44 The x86 BIOS legacy requires a master boot record (MBR) and \fBfdisk\fR table
45 in the first physical sector of the bootable media. If the x86 hard disk
46 contains a Solaris disk label, it is located in the second 512-byte sector of
48 .SH DEVICE SPECIAL FILES
50 Block-files access the disk using normal buffering mechanism and are read-from
51 and written-to without regard to physical disk records. A \fBraw\fR interface
52 enables direct transmission between the disk and the user's read or write
53 buffer. A single \fBread\fR or \fBwrite\fR call usually results in a single I/O
54 operation, therefore raw I/O is more efficient when many bytes are transmitted.
55 Block files names are found in \fB/dev/dsk\fR; raw file names are found in
59 I/O requests to the raw device must be aligned on a 512-byte (\fBDEV_BSIZE\fR)
60 boundary and all I/O request lengths must be in multiples of 512 bytes.
61 Requests that do not meet these requirements will trigger an \fBEINVAL\fR
62 error. There are no alignment or length restrictions on I/O requests to the
64 .SH CD-ROM DRIVE SUPPORT
66 A CD-ROM disk is single-sided and contains approximately 640 megabytes of data
67 or 74 minutes of audio. When the CD-ROM is opened, the eject button is disabled
68 to prevent manual removal of the disk until the last \fBclose()\fR is called.
69 No volume label is required for a CD-ROM. The disk geometry and partitioning
70 information are constant and never change. If the CD-ROM contains data recorded
71 in a Solaris-aware file system format, it can be mounted using the appropriate
72 Solaris file system support.
73 .SH DVD-ROM DRIVE SUPPORT
75 DVD-ROM media can be single or double-sided and can be recorded upon using a
76 single or double layer structure. Double-layer media provides parallel or
77 opposite track paths. A DVD-ROM can hold from between 4.5 Gbytes and 17 Gbytes
78 of data, depending on the layer structure used for recording and if the DVD-ROM
79 is single or double-sided.
82 When the DVD-ROM is opened, the eject button is disabled to prevent the manual
83 removal of a disk until the last \fBclose()\fR is called. No volume label is
84 required for a DVD-ROM. If the DVD-ROM contains data recorded in a
85 Solaris-aware file system format, it can be mounted using the appropriate
86 Solaris file system support.
87 .SH ZIP/JAZ DRIVE SUPPORT
89 \fBZIP/JAZ\fR media provide varied data capacity points; a single \fBJAZ
90 \fRdrive can store up to 2 GBytes of data, while a ZIP-250 can store up to
91 250MBytes of data. \fBZIP/JAZ\fR drives can be read-from or written-to using
92 the appropriate drive.
95 When a \fBZIP/JAZ\fR drive is opened, the eject button is disabled to prevent
96 the manual removal of a disk until the last \fBclose()\fR is called. No volume
97 label is required for a \fBZIP/JAZ\fR drive. If the \fBZIP/JAZ\fR drive
98 contains data recorded in a Solaris-aware file system format, it can be mounted
99 using the appropriate Solaris file system support.
100 .SH DEVICE STATISTICS SUPPORT
102 Each device maintains I/O statistics for the device and for partitions
103 allocated for that device. For each device/partition, the driver accumulates
104 reads, writes, bytes read, and bytes written. The driver also initiates
105 hi-resolution time stamps at queue entry and exit points to enable monitoring
106 of residence time and cumulative residence-length product for each queue.
109 Not all device drivers make per-partition IO statistics available for
110 reporting. \fBsd\fR and \fBssd\fR(7D) per-partition statistics are enabled by
111 default but may disabled in their configuration files.
114 Refer to \fBdkio\fR(7I), and \fBcdio\fR(7I)
130 The partition was opened exclusively by another thread
139 The argument features a bad address
157 The device does not support the requested ioctl function
166 During opening, the device did not exist. During close, the drive unlock failed
175 The device is read-only
184 Resource temporarily unavailable
193 A signal was caught during the execution of the \fBioctl()\fR function
211 Insufficent access permission
220 An I/O error occurred. Refer to notes for details on copy-protected DVD-ROM
226 The \fBsd\fR driver can be configured by defining properties in the
227 \fBsd.conf\fR file. The \fBsd\fR driver supports the following properties:
231 \fB\fBenable-partition-kstats\fR\fR
234 The default value is 1, which causes partition IO statistics to be maintained.
235 Set this value to zero to prevent the driver from recording partition
236 statistics. This slightly reduces the CPU overhead for IO, mimimizes the amount
237 of \fBsar\fR(1) data collected and makes these statistics unavailable for
238 reporting by \fBiostat\fR(1M) even though the \fB-p\fR/\fB-P\fR option is
239 specified. Regardless of this setting, disk IO statistics are always
246 \fB\fBqfull-retries\fR\fR
249 The supplied value is passed as the \fBqfull-retries\fR capability value of the
250 HBA driver. See \fBscsi_ifsetcap\fR(9F) for details.
256 \fB\fBqfull-retry-interval\fR\fR
259 The supplied value is passed as the \fBqfull-retry interval\fR capability value
260 of the HBA driver. See \fBscsi_ifsetcap\fR(9F) for details.
266 \fB\fBallow-bus-device-reset\fR\fR
269 The default value is 1, which allows resetting to occur. Set this value to
270 \fB0\fR (zero) to prevent the \fBsd\fR driver from calling \fBscsi_reset\fR(9F)
271 with a second argument of \fBRESET_TARGET\fR when in error-recovery mode. This
272 \fBscsi_reset\fR(9F) call may prompt the HBA driver to send a SCSI Bus Device
273 Reset message. The \fBscsi_reset\fR(9F) call with a second argument of
274 \fBRESET_TARGET\fR may result from an explicit request via the \fBUSCSICMD\fR
275 \fBioctl\fR. Some high-availability multi-initiator systems may wish to
276 prohibit the Bus Device Reset message; to do this, set the
277 \fBallow-bus-device-reset\fR property to \fB0\fR.
283 \fBoptical-device-bind\fR
286 Controls the binding of the driver to non self-identifying SCSI target optical
287 devices. (See \fBscsi\fR(4)). The default value is 1, which causes \fBsd\fR to
288 bind to DTYPE_OPTICAL devices (as noted in \fBscsi\fR(4)). Setting this value
289 to 0 prevents automatic binding. The default behavior for the SPARC-based
290 \fBsd\fR driver prior to Solaris 9 was not to bind to optical devices.
296 \fB\fBpower-condition\fR\fR
299 Boolean type, when set to \fBFalse\fR, it indicates that the disk does not
300 support \fBpower condition\fR field in the \fBSTART STOP UNIT\fR command.
305 In addition to the above properties, some device-specific tunables can be
306 configured in \fBsd.conf\fR using the \fBsd-config-list\fR global property. The
307 value of this property is a list of duplets. The formal syntax is:
311 sd-config-list = <duplet> [, <duplet> ]* ;
315 <duplet>:= "<vid+pid>" , "<tunable-list>"
319 <tunable-list>:= <tunable> [, <tunable> ]*;
320 <tunable> = <name> : <value>
322 The <vid+pid> is the string that is returned by the target device
323 on a SCSI inquiry command.
325 The <tunable-list> contains one or more tunables to apply to
326 all target devices with the specified <vid+pid>.
328 Each <tunable> is a <name> : <value> pair. Supported
331 delay-busy: when busy, nsecs of delay before retry.
333 retries-timeout: retries to perform on an IO timeout.
340 \fB\fBmmc-gesn-polling\fR\fR
343 For optical drives compliant with \fBMMC-3\fR and supporting the \fBGET EVENT
344 STATUS NOTIFICATION\fR command, this command is used for periodic media state
345 polling, usually initiated by the \fBDKIOCSTATE\fR \fBdkio\fR(7I) ioctl. To
346 disable the use of this command, set this boolean property to \fBfalse\fR. In
347 that case, either the \fBTEST UNIT READY\fR or zero-length \fBWRITE(10)\fR
348 command is used instead.
354 The following is an example of a global sd-config-list property:
357 "SUN T4", "delay-busy:600, retries-timeout:6",
358 "SUN StorEdge_3510", "retries-timeout:3";
365 \fB\fB/kernel/drv/sd.conf\fR\fR
368 Driver configuration file
374 \fB\fB/dev/dsk/cntndnsn\fR\fR
383 \fB\fB/dev/rdsk/cntndnsn\fR\fR
407 SCSI target id n (0-6)
416 SCSI LUN n (0-7 normally; some HBAs support LUNs to 15 or 32. See the specific
432 \fB\fB/dev/rdsk/cntndnpn\fR\fR
447 Where \fIn\fR=0 the node corresponds to the entire disk.
452 \fBsar\fR(1), \fBcfgadm_scsi\fR(1M), \fBfdisk\fR(1M), \fBformat\fR(1M),
453 \fBiostat\fR(1M), \fBclose\fR(2), \fBioctl\fR(2), \fBlseek\fR(2),
454 \fBread\fR(2), \fBwrite\fR(2), \fBdriver.conf\fR(4), \fBscsi\fR(4),
455 \fBfilesystem\fR(5), \fBscsa2usb\fR(7D), \fBssd\fR(7D), \fBhsfs\fR(7FS),
456 \fBpcfs\fR(7FS), \fBudfs\fR(7FS), \fBcdio\fR(7I), \fBdkio\fR(7I),
457 \fBscsi_ifsetcap\fR(9F), \fBscsi_reset\fR(9F)
460 \fIANSI Small Computer System Interface-2 (SCSI-2)\fR
463 \fIATA Packet Interface for CD-ROMs, SFF-8020i\fR
466 \fIMt.Fuji Commands for CD and DVD, SFF8090v3\fR
470 Error for Command:\fI<command name>\fR
472 Requested Block: \fI<n>\fR
473 Error Block: \fI<m>\fR
474 Vendor:'\fI<vendorname>\fR\&'
475 Serial Number:'\fI<serial number>\fR\&'
476 Sense Key:\fI<sense key name>\fR
484 \fBASC: 0x<a> (<ASC name>), ASCQ: 0x<b>, FRU: 0x<c>\fR
488 The command indicated by <command name> failed. The Requested Block is the
489 block where the transfer started and the Error Block is the block that caused
490 the error. Sense Key, \fBASC\fR, and \fBASCQ\fR information is returned by the
491 target in response to a request sense command.
497 \fBCaddy not inserted in drive\fR
501 The drive is not ready because no caddy has been inserted.
507 \fBCheck Condition on REQUEST SENSE\fR
511 A REQUEST SENSE command completed with a check condition. The original command
512 will be retried a number of times.
518 \fBLabel says <m> blocks Drive says <n> blocks\fR
522 There is a discrepancy between the label and what the drive returned on the
523 \fBREAD CAPACITY\fR command.
529 \fBNot enough sense information\fR
533 The request sense data was less than expected.
539 \fBRequest Sense couldn't get sense data\fR
543 The \fBREQUEST SENSE\fR command did not transfer any data.
549 \fBReservation Conflict\fR
553 The drive was reserved by another initiator.
559 \fBSCSI transport failed: reason \fB\&'xxxx'\fR: {retrying|giving up}\fR
563 The host adapter has failed to transport a command to the target for the reason
564 stated. The driver will either retry the command or, ultimately, give up.
570 \fBUnhandled Sense Key<\fIn\fR>\fR
574 The REQUEST SENSE data included an invalid sense.
580 \fBUnit not ready. Additional sense code 0x\fR
584 \fI<n>\fR The drive is not ready.
590 \fBCan't do switch back to mode 1\fR
594 A failure to switch back to read mode 1.
600 \fBCorrupt label - bad geometry\fR
604 The disk label is corrupted.
610 \fBCorrupt label - label checksum failed\fR
614 The disk label is corrupted.
620 \fBCorrupt label - wrong magic number\fR
624 The disk label is corrupted.
630 \fBDevice busy too long\fR
634 The drive returned busy during a number of retries.
640 \fBDisk not responding to selection\fR
644 The drive is powered down or died
650 \fBFailed to handle UA\fR
654 A retry on a Unit Attention condition failed.
660 \fBI/O to invalid geometry\fR
664 The geometry of the drive could not be established.
670 \fBIncomplete read/write - retrying/giving up\fR
674 There was a residue after the command completed normally.
680 \fBNo bp for direct access device format geometry\fR
684 A bp with consistent memory could not be allocated.
690 \fBNo bp for disk label\fR
694 A bp with consistent memory could not be allocated.
700 \fBNo bp for fdisk\fR
704 A bp with consistent memory could not be allocated.
710 \fBNo bp for rigid disk geometry\fR
714 A bp with consistent memory could not be allocated.
720 \fBNo mem for property\fR
724 Free memory pool exhausted.
730 \fBNo memory for direct access device format geometry\fR
734 Free memory pool exhausted.
740 \fBNo memory for disk label\fR
744 Free memory pool exhausted.
750 \fBNo memory for rigid disk geometry\fR
754 The disk label is corrupted.
760 \fBNo resources for dumping\fR
764 A packet could not be allocated during dumping.
774 Drive went offline; probably powered down.
780 \fBRequeue of command fails\fR
784 Driver attempted to retry a command and experienced a transport error.
790 \fBsdrestart transport failed()\fR
794 Driver attempted to retry a command and experienced a transport error.
800 \fBTransfer length not modulo\fR
804 Illegal request size.
810 \fBTransport of request sense fails()\fR
814 Driver attempted to submit a request sense command and failed.
820 \fBTransport rejected()\fR
824 Host adapter driver was unable to accept a command.
830 \fBUnable to read label\fR
834 Failure to read disk label.
840 \fBUnit does not respond to selection\fR
844 Drive went offline; probably powered down.
849 DVD-ROM media containing DVD-Video data may follow/adhere to the requirements
850 of content scrambling system or copy protection scheme. Reading of
851 copy-protected sector will cause I/O error. Users are advised to use the
852 appropriate playback software to view video contents on DVD-ROM media
853 containing DVD-Video data.