sd01(7)


sd01 -- Storage Device Interface (SDI) disk target driver

Description

The sd01 disk target driver is the device-level driver for Small Computer System Interface (SCSI) hard disks, SCSI optical disks, and ESDI/ST506/IDE/MFM integral disks. It provides block and character (raw) access to the disk, and I/O controls (ioctl) to the disk. sd01 and vtoc sets up two levels of organization to the disk, to allow the disk to be shared with other operating systems, and provide efficient sized portions within the UNIX system.

See vtoc(7) for an explanation of UnixWare disk slices and minor numbers.

Mapping of bad blocks is performed dynamically and automatically by the sd01 disk driver, without user intervention and without retaining a fixed bad block log on the disk. The SCSI direct-access controllers reassign the defective blocks to an area on the disk reserved for this purpose. The sd01 disk driver can map both marginal bad blocks (that is, readable with some difficulty) and actual bad blocks (that is, unreadable). It also keeps track of blocks that are currently unreadable, but which have not yet been remapped. The sd01 driver does not map or report a bad block residing in a non-UNIX System (for example, MS-DOS) partition of the disk. In addition, even with dynamic bad block handling, it is possible for damage to occur that cannot be mapped automatically. This means that you might have to restore the filesystem from the last full backup if the bad block occurs in a critical area of the disk that cannot tolerate bad sectors.

The sd01 disk driver supports a recovery gauntlet to handle jobs that timeout. The recovery gauntlet uses an hierarchical approach to the recovery process. Initial action is to retry the job, unless the job had been timed out by the software timeout mechanism and the associated job abort was not successful. The working assumption is that if the job was timed out and the job could not be aborted, then the target device is in an unresponsive state. In this case, the target driver resets the associated SCSI device, and then retries the job. If the job fails after the device reset, the SCSI bus is reset and the job is retried. The recovery gauntlet is exited on the successful completion of the job after any retry, or it is exited as a failed job when the retry fails after the SCSI bus reset.

The sd01 disk driver reports problems with driver error messages. The error numbers in the error messages identify the type of error. For SCSI sense codes, extended sense codes, and command codes, see /usr/include/sys/scsi.h. For SDI return codes, see /usr/include/sys/sdi.h.

The sd01 driver receives command requests from the kernel through the Input/Output (I/O) control call ioctl(2). The sd01 driver generates the requested commands and passes them to the host adapter driver. When command execution is complete, the host adapter driver notifies the sd01 driver through an interrupt. After this notification, the sd01 driver performs any required error recovery and indicates to the kernel that the I/O request is complete.

ioctl calls

The ioctl calls used by the sd01 driver are documented on the sdi(7) manual page.

Usage

The vtoc driver retries failed transfers up to two times depending on the error type. Certain errors are not retried. sd01 displays an appropriate message upon encountering an error during the transfer.

vtoc and the second-stage bootstrap require that no bad sectors occur in the first 30 sectors of the UNIX System partition on the disk. When a marginal bad block occurs, the driver's warning indicates that the controller's error-correction algorithm successfully recovered from an error. This may be a symptom of a sector going bad.

The sd01 disk target driver allows access to non-UNIX partitions on a disk, even if there is no UnixWare partition or VTOC. It does so by using the information in the fdisk table and the /dsk/cCbBtTdDp[0-4] special device nodes.

The nodes called /dev/[r]dsk/1s[0-9] will exist only when there is actually a second disk on the system. In the past, these nodes were always created. It is no longer possible to create these nodes when the second disk does not exist because it is not possible to predict the correct minor number for them.

Compatibility

The sd01 driver recognizes SCO OpenServer partitions set up with the divvy command. If it finds one on a disk, it translates the partition division information to VTOC format in memory. This enables read and write operations to an SCO OpenServer slice, but the slice configuration cannot be changed. Currently mapped bad blocks are recognized, but no new bad blocks can be mapped. Use the sdimkosr5(1M) command to convert a disk formatted for SCO OpenServer to UnixWare format.

Files


/dev/dsk/*

/dev/rdsk/*

/usr/include/sys/scsi.h

/usr/include/sys/sdi.h

/usr/include/sys/sdi_edt.h

/usr/include/sys/vtoc.h

References

adsc(7), disk(7), disksetup(1M), dpt(7), edvtoc(1M), fdisk(1M), ioctl(2) mcis(7) mount(1M), prtvtoc(1M), sc01(7), sdi(7), sdimkosr5(1M), st01(7), sw01(7), vtoc(7), wd7000(7)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004