1sd(7D)                              Devices                             sd(7D)
2
3
4

NAME

6       sd - SCSI disk and ATAPI/SCSI CD-ROM device driver
7

SYNOPSIS

9       sd@target,lun:partition
10
11

DESCRIPTION

13       To  open a device without checking if the vtoc is valid, use the O_NDE‐
14       LAY flag. When the device is opened using O_NDELAY, the first  read  or
15       write  to  the  device that happens after the open results in the label
16       being read if the label is not currently valid. Once  read,  the  label
17       remains  valid  until  the last close of the device. Except for reading
18       the label, O_NDELAY has no impact on the driver.
19
20   SPARC
21       The sd SCSI and SCSI/ATAPI driver supports embedded SCSI-2 and CCS-com‐
22       patible  SCSI  disk and CD-ROM drives, ATAPI  2.6 (SFF-8020i)-compliant
23       CD-ROM drives, SFF-8090-compliant  SCSI/ATAPI  DVD-ROM  drives,  IOMEGA
24       SCSI/ATAPI  ZIP  drives,  SCSI JAZ drives, and USB mass storage devices
25       (refer to scsa2usb(7D)).
26
27
28       To determine the disk drive type, use the  SCSI/ATAPI  inquiry  command
29       and  read  the volume label stored on block 0 of the drive. (The volume
30       label describes the disk geometry and partitioning and must be  present
31       for  the  disk  to  be  mounted  by  the system.) A volume label is not
32       required for removable, re-writable or read-only media.
33
34   x86 Only
35       The sddriver supports embedded SCSI-2 and CCS-compatible SCSI disk  and
36       CD-ROM   drives,   ATAPI   2.6   (SFF-8020i)-compliant  CD-ROM  drives,
37       SFF-8090-compliant SCSI/ATAPI DVD-ROM  drives,  IOMEGA  SCSI/ATAPI  ZIP
38       drives, and SCSI JAZ drives.
39
40
41       The x86 BIOS legacy requires a master boot record (MBR) and fdisk table
42       in the first physical sector of the bootable media.  If  the  x86  hard
43       disk  contains  a  Solaris  disk  label,  it  is  located in the second
44       512-byte sector of the FDISK partition.
45

DEVICE SPECIAL FILES

47       Block-files access the disk using normal buffering  mechanism  and  are
48       read-from and written-to without regard to physical disk records. A raw
49       interface enables direct transmission between the disk and  the  user's
50       read  or write buffer. A single read or write call usually results in a
51       single I/O operation, therefore raw I/O is  more  efficient  when  many
52       bytes  are  transmitted.  Block  files names are found in /dev/dsk; raw
53       file names are found in /dev/rdsk.
54
55
56       I/O  requests  to  the  raw  device  must  be  aligned  on  a  512-byte
57       (DEV_BSIZE)  boundary  and all I/O request lengths must be in multiples
58       of 512 bytes. Requests that do not meet these requirements will trigger
59       an  EINVAL  error. There are no alignment or length restrictions on I/O
60       requests to the block device.
61

CD-ROM DRIVE SUPPORT

63       A CD-ROM disk is single-sided and contains approximately 640  megabytes
64       of  data  or  74 minutes of audio. When the CD-ROM is opened, the eject
65       button is disabled to prevent manual removal of the disk until the last
66       close()  is  called. No volume label is required for a CD-ROM. The disk
67       geometry and partitioning information are constant and never change. If
68       the  CD-ROM  contains data recorded in a Solaris-aware file system for‐
69       mat, it can be mounted using the appropriate Solaris file  system  sup‐
70       port.
71

DVD-ROM DRIVE SUPPORT

73       DVD-ROM  media  can  be single or double-sided and can be recorded upon
74       using a single or double layer structure. Double-layer  media  provides
75       parallel  or  opposite track paths. A DVD-ROM can hold from between 4.5
76       Gbytes and 17 Gbytes of data, depending on the layer structure used for
77       recording and if the DVD-ROM is single or double-sided.
78
79
80       When the DVD-ROM is opened, the eject button is disabled to prevent the
81       manual removal of a disk until the last close() is  called.  No  volume
82       label  is required for a DVD-ROM. If the DVD-ROM contains data recorded
83       in a Solaris-aware file system format, it  can  be  mounted  using  the
84       appropriate Solaris file system support.
85

ZIP/JAZ DRIVE SUPPORT

87       ZIP/JAZ  media  provide varied data capacity points; a single JAZ drive
88       can store up to 2 GBytes of data, while  a  ZIP-250  can  store  up  to
89       250MBytes  of data. ZIP/JAZ drives can be read-from or written-to using
90       the appropriate drive.
91
92
93       When a ZIP/JAZ drive is opened, the eject button is disabled to prevent
94       the  manual removal of a disk until the last close() is called. No vol‐
95       ume label is required for a ZIP/JAZ drive. If the  ZIP/JAZ  drive  con‐
96       tains  data  recorded  in a Solaris-aware file system format, it can be
97       mounted using the appropriate Solaris file system support.
98

DEVICE STATISTICS SUPPORT

100       Each device maintains I/O statistics for the device and for  partitions
101       allocated  for that device. For each device/partition, the driver accu‐
102       mulates reads, writes, bytes read, and bytes written. The  driver  also
103       initiates  hi-resolution  time stamps at queue entry and exit points to
104       enable monitoring of residence  time  and  cumulative  residence-length
105       product for each queue.
106
107
108       Not  all  device drivers make per-partition IO statistics available for
109       reporting. sd and  ssd(7D)  per-partition  statistics  are  enabled  by
110       default but may disabled in their configuration files.
111

IOCTLS

113       Refer to dkio(7I), and cdio(7I)
114
115   ERRORS
116       EACCES    Permission denied
117
118
119       EBUSY     The partition was opened exclusively by another thread
120
121
122       EFAULT    The argument features a bad address
123
124
125       EINVAL    Invalid argument
126
127
128       ENOTTY    The device does not support the requested ioctl function
129
130
131       ENXIO     During  opening,  the device did not exist. During close, the
132                 drive unlock failed
133
134
135       EROFS     The device is read-only
136
137
138       EAGAIN    Resource temporarily unavailable
139
140
141       EINTR     A signal was caught during the execution of the ioctl() func‐
142                 tion
143
144
145       ENOMEM    Insufficient memory
146
147
148       EPERM     Insufficent access permission
149
150
151       EIO       An  I/O  error  occurred. Refer to notes for details on copy-
152                 protected DVD-ROM media.
153
154

CONFIGURATION

156       The sd driver can be configured by defining properties in  the  sd.conf
157       file. The sd driver supports the following properties:
158
159       enable-partition-kstats    The  default value is 1, which causes parti‐
160                                  tion IO statistics  to  be  maintained.  Set
161                                  this  value  to  zero  to prevent the driver
162                                  from recording  partition  statistics.  This
163                                  slightly  reduces  the  CPU overhead for IO,
164                                  mimimizes the amount  of  sar(1)  data  col‐
165                                  lected  and  makes these statistics unavail‐
166                                  able for reporting by iostat(1M) even though
167                                  the -p/-P option is specified. Regardless of
168                                  this setting, disk IO statistics are  always
169                                  maintained.
170
171
172       qfull-retries              The  supplied  value is passed as the qfull-
173                                  retries capability value of the HBA  driver.
174                                  See scsi_ifsetcap(9F) for details.
175
176
177       qfull-retry-interval       The  supplied  value is passed as the qfull-
178                                  retry interval capability value of  the  HBA
179                                  driver. See scsi_ifsetcap(9F) for details.
180
181
182       allow-bus-device-reset     The  default value is 1, which allows reset‐
183                                  ting to occur. Set this value to 0 (zero) to
184                                  prevent   the   sd   driver   from   calling
185                                  scsi_reset(9F) with  a  second  argument  of
186                                  RESET_TARGET  when  in  error-recovery mode.
187                                  This scsi_reset(9F) call may prompt the  HBA
188                                  driver  to send a SCSI Bus Device Reset mes‐
189                                  sage. The scsi_reset(9F) call with a  second
190                                  argument  of RESET_TARGET may result from an
191                                  explicit request  via  the  USCSICMD  ioctl.
192                                  Some  high-availability multi-initiator sys‐
193                                  tems may wish to  prohibit  the  Bus  Device
194                                  Reset  message;  to  do this, set the allow-
195                                  bus-device-reset property to 0.
196
197
198       optical-device-bind        Controls the binding of the  driver  to  non
199                                  self-identifying    SCSI    target   optical
200                                  devices. (See scsi(4)). The default value is
201                                  1,  which causes sd to bind to DTYPE_OPTICAL
202                                  devices (as noted in scsi(4)).  Setting this
203                                  value  to  0 prevents automatic binding. The
204                                  default  behavior  for  the  SPARC-based  sd
205                                  driver prior to Solaris 9 was not to bind to
206                                  optical devices.
207
208
209       power-condition            Boolean type, when set to  False,  it  indi‐
210                                  cates  that  the disk does not support power
211                                  condition field in the START STOP UNIT  com‐
212                                  mand.
213
214
215
216       In  addition to the above properties, some device-specific tunables can
217       be configured in sd.conf using the sd-config-list global property.  The
218       value of this property is a list of duplets. The formal syntax is:
219
220         sd-config-list = <duplet> [, <duplet> ]* ;
221
222         where
223
224         <duplet>:= "<vid+pid>" , "<tunable-list>"
225
226         and
227
228         <tunable-list>:= <tunable>  [, <tunable> ]*;
229         <tunable> = <name> : <value>
230
231         The <vid+pid> is the string that is returned by the target device
232         on a SCSI inquiry command.
233
234         The <tunable-list> contains one or more tunables to apply to
235         all target devices with the specified <vid+pid>.
236
237         Each <tunable> is a <name> : <value> pair. Supported
238         tunable names are:
239
240            delay-busy: when busy, nsecs of delay before retry.
241
242            retries-timeout: retries to perform on an IO timeout.
243
244
245       mmc-gesn-polling    For  optical  drives  compliant with MMC-3 and sup‐
246                           porting the GET EVENT STATUS NOTIFICATION  command,
247                           this  command  is  used  for  periodic  media state
248                           polling,  usually  initiated  by   the   DKIOCSTATE
249                           dkio(7I) ioctl. To disable the use of this command,
250                           set this boolean property to false. In  that  case,
251                           either the TEST UNIT READY or zero-length WRITE(10)
252                           command is used instead.
253
254

EXAMPLES

256         The following is an example of a global sd-config-list property:
257
258            sd-config-list =
259               "SUN     T4", "delay-busy:600, retries-timeout:6",
260               "SUN     StorEdge_3510", "retries-timeout:3";
261
262

FILES

264       /kernel/drv/sd.conf    Driver configuration file
265
266
267       /dev/dsk/cntndnsn      Block files
268
269
270       /dev/rdsk/cntndnsn     Raw files
271
272
273
274       Where:
275
276       cn    controller n
277
278
279       tn    SCSI target id n (0-6)
280
281
282       dn    SCSI LUN n (0-7 normally; some HBAs support LUNs to 15 or 32. See
283             the specific manpage for details)
284
285
286       sn    partition n (0-7)
287
288
289   x86 Only
290       /dev/rdsk/cntndnpn    raw files
291
292
293
294       Where:
295
296       pn    Where n=0 the node corresponds to the entire disk.
297
298

SEE ALSO

300       sar(1),  cfgadm_scsi(1M),  fdisk(1M), format(1M), iostat(1M), close(2),
301       ioctl(2),  lseek(2),  read(2),   write(2),   driver.conf(4),   scsi(4),
302       filesystem(5),  scsa2usb(7D), ssd(7D), hsfs(7FS), pcfs(7FS), udfs(7FS),
303       cdio(7I), dkio(7I), scsi_ifsetcap(9F), scsi_reset(9F)
304
305
306       ANSI Small Computer System Interface-2 (SCSI-2)
307
308
309       ATA Packet Interface for CD-ROMs, SFF-8020i
310
311
312       Mt.Fuji Commands for CD and DVD, SFF8090v3
313
314
315       http://www.sun.com/io
316

DIAGNOSTICS

318         Error for Command:<command name>
319         Error Level: Fatal
320         Requested Block: <n>
321         Error  Block: <m>
322         Vendor:'<vendorname>'
323         Serial Number:'<serial number>'
324         Sense Key:<sense key name>
325
326
327
328       ASC: 0x<a> (<ASC name>), ASCQ: 0x<b>, FRU: 0x<c>
329
330           The command indicated by <command name> failed. The Requested Block
331           is  the block where the transfer started and the Error Block is the
332           block that caused the error. Sense Key, ASC, and  ASCQ  information
333           is returned by the target in response to a request sense command.
334
335
336       Caddy not inserted in drive
337
338           The drive is not ready because no caddy has been inserted.
339
340
341       Check Condition on REQUEST SENSE
342
343           A REQUEST SENSE command completed with a check condition. The orig‐
344           inal command will be retried a number of times.
345
346
347       Label says <m> blocks Drive says <n> blocks
348
349           There is a  discrepancy  between  the  label  and  what  the  drive
350           returned on the READ CAPACITY command.
351
352
353       Not enough sense information
354
355           The request sense data was less than expected.
356
357
358       Request Sense couldn't get sense data
359
360           The REQUEST SENSE command did not transfer any data.
361
362
363       Reservation Conflict
364
365           The drive was reserved by another initiator.
366
367
368       SCSI transport failed: reason 'xxxx': {retrying|giving up}
369
370           The  host  adapter  has failed to transport a command to the target
371           for the reason stated. The driver will either retry the command or,
372           ultimately, give up.
373
374
375       Unhandled Sense Key<n>
376
377           The REQUEST SENSE data included an invalid sense.
378
379
380       Unit not ready. Additional sense code 0x
381
382           <n> The drive is not ready.
383
384
385       Can't do switch back to mode 1
386
387           A failure to switch back to read mode 1.
388
389
390       Corrupt label - bad geometry
391
392           The disk label is corrupted.
393
394
395       Corrupt label - label checksum failed
396
397           The disk label is corrupted.
398
399
400       Corrupt label - wrong magic number
401
402           The disk label is corrupted.
403
404
405       Device busy too long
406
407           The drive returned busy during a number of retries.
408
409
410       Disk not responding to selection
411
412           The drive is powered down or died
413
414
415       Failed to handle UA
416
417           A retry on a Unit Attention condition failed.
418
419
420       I/O to invalid geometry
421
422           The geometry of the drive could not be established.
423
424
425       Incomplete read/write - retrying/giving up
426
427           There was a residue after the command completed normally.
428
429
430       No bp for direct access device format geometry
431
432           A bp with consistent memory could not be allocated.
433
434
435       No bp for disk label
436
437           A bp with consistent memory could not be allocated.
438
439
440       No bp for fdisk
441
442           A bp with consistent memory could not be allocated.
443
444
445       No bp for rigid disk geometry
446
447           A bp with consistent memory could not be allocated.
448
449
450       No mem for property
451
452           Free memory pool exhausted.
453
454
455       No memory for direct access device format geometry
456
457           Free memory pool exhausted.
458
459
460       No memory for disk label
461
462           Free memory pool exhausted.
463
464
465       No memory for rigid disk geometry
466
467           The disk label is corrupted.
468
469
470       No resources for dumping
471
472           A packet could not be allocated during dumping.
473
474
475       Offline
476
477           Drive went offline; probably powered down.
478
479
480       Requeue of command fails
481
482           Driver  attempted  to  retry  a command and experienced a transport
483           error.
484
485
486       sdrestart transport failed()
487
488           Driver attempted to retry a command  and  experienced  a  transport
489           error.
490
491
492       Transfer length not modulo
493
494           Illegal request size.
495
496
497       Transport of request sense fails()
498
499           Driver attempted to submit a request sense command and failed.
500
501
502       Transport rejected()
503
504           Host adapter driver was unable to accept a command.
505
506
507       Unable to read label
508
509           Failure to read disk label.
510
511
512       Unit does not respond to selection
513
514           Drive went offline; probably powered down.
515
516

NOTES

518       DVD-ROM  media  containing  DVD-Video  data  may  follow/adhere  to the
519       requirements of content scrambling system or  copy  protection  scheme.
520       Reading  of  copy-protected  sector  will  cause  I/O  error. Users are
521       advised to use the appropriate playback software to view video contents
522       on DVD-ROM media containing DVD-Video data.
523
524
525
526SunOS 5.11                        8 Sep 2009                            sd(7D)
Impressum