ZD(4) — UNIX Programmer’s Manual
NAME
zd − Sequent Dual-Channel Disk Controller
SYNOPSIS
device zd0 at zdc? drive ? drive_type ?
DESCRIPTION
This device driver controls SMD drives on the Sequent Dual-Channel Disk Controller (DCC). Each DCC can control up to eight SMD disk drives split across two DMA channels. All of the drives on the same channel must be identical in type and format.
Special files with minor device numbers 0 through 7 refer to various portions of drive 0; minor devices 8 through 15 refer to drive 1, etc. The standard device names begin with “zd” followed by the drive number and then a letter a-h for partitions 0-7 respectively — e.g., “zd0a”.
The block devices access the disk via the system’s normal buffering mechanism and may be read and written without regard to physical disk records. There is also a ‘raw’ interface which provides for direct transmission between the disk and the user’s read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw files conventionally begin with an extra ‘r’ — e.g., “rzd0a”.
All raw I/O counts must be a multiple of 512 bytes (a disk sector) and must begin on 16-byte aligned memory addresses.
A drive may be spun up after DYNIX is booted if the configuration for the drive is anchored (controller and drive numbers explicitly specified in the kernel configuration file) and there are no wildcarded drives configured before the anchored drive. This is possible since the state of the disk drive and configuration is reassessed at each first open of the device.
This device driver does not keep the "milliseconds per seek" statistic. Specifically, the dk_bps and dk_seek fields of the dk structure defined in /usr/include/sys/dk.h are not maintained. Thus, iostat(1) always reports zero for this statistic.
BINARY CONFIGURATION
When building a kernel with DCC disks configured, be sure that the binary configuration information in /sys/conf/conf_zd.c is up to date. If you change a partition table, the stand-alone configuration file /stand/conf_zd.c must also be changed. The constants and variables defined in conf_zd.c include:
m2333k
Partition table for the Fujitsu M2333K (Swallow) disk drive.
m2351a
Partition table for the Fujitsu M2351A (Eagle) disk drive.
m2344k
Partition table for the Fujitsu M2344K (Swallow 4) disk drive.
cdc9720_850
Partition table for the CDC 9720 disk drive.
zdparts
This is an array indexed by drive type. It should be changed only if new drive types are added.
zdc_iovpercb
This is the number of iovecs allocated per DCC command block. See /usr/include/zdc/zdc.h. If the value is set to zero, the driver will allocate enough iovecs to handle the system’s notion of the maximum raw I/O transfer size (i.e., max_RAW_IO). Each iovec contains the physical address of a page in memory. The driver minphys routine (zdminphys()) uses this variable to set the maximum raw I/O transfer size.
zdretry
The maximum number of times to retry errors.
The driver assumes that all disks of a given type (i.e., M2333K, M2344K, M2351A, or cdc9720_850) will use the same partition table. A disk’s type is stored on the disk when it is formatted. The driver reads this value from the disk and uses it as an index into zdparts[] to select the appropriate partition table in /sys/conf/conf_zd.c.
DISK SUPPORT
The driver supports the Fujitsu M2333K “Swallow”, the Fujitsu M2344K “Swallow 4”, the Fujitsu M2351A “Eagle”, and the CDC 9720-850 disk drives. Other drives may be added to the configuration tables. The origin and size (in sectors) of the partitions on each drive are as follows:
Fujitsu “Swallow” partitions
partitionlengthstart cyls
a 25∗66∗10335335 - 359
b102∗66∗10360360 - 461
c820∗66∗10 1 1 - 820
d410∗66∗10 1 1 - 410
e410∗66∗10411411 - 820
f359∗66∗10 1 1 - 359
g359∗66∗10462462 - 820
h334∗66∗10 1 1 - 334
Fujitsu “Eagle” partitions
partitionlengthstart cyls
a 18∗46∗20403403 - 420
b 73∗46∗20421421 - 493
c839∗46∗20 1 1 - 839
d384∗46∗20 1 1 - 384
e 18∗46∗20385385 - 402
f346∗46∗20494494 - 839
g100∗46∗20494494 - 593
h246∗46∗20594594 - 839
Fujitsu “Swallow 4” partitions
partitionlengthstart cyls
a 10∗66∗27282282 - 291
b 38∗66∗27292292 - 329
c621∗66∗27 1 1 - 621
d310∗66∗27 1 1 - 310
e311∗66∗27311311 - 621
f291∗66∗27 1 1 - 291
g292∗66∗27330330 - 621
h281∗66∗27 1 1 - 281
CDC 9720-850 partitions
partitionlengthstart cyls
a 17∗68∗15640640 - 656
b 66∗68∗15657657 - 722
c1378∗68∗15 1 1 - 1378
d 689∗68∗15 1 1 - 689
e 689∗68∗15690690 - 1378
f 656∗68∗15 1 1 - 656
g 656∗68∗15723723 - 1378
h 639∗68∗15 1 1 - 639
Notice that the ’a’ partition resides in the middle of the disk and the ’c’ partition starts at cylinder 1 (not 0).
It is unwise to keep around the special files for unused disk partitions, since there is overlap in addresses and protection becomes a sticky matter. The ’a’ partition is normally used for the root file system, the ’b’ partition as a paging area, and the ’c’ partition for pack-to-pack copying as it maps the entire disk. The first cylinder (cylinder 0) is reserved to contain the bad block lists and disk description data. The last 2 cylinders are reserved for diagnostics. No partition contains any of these reserved cylinders. Note that ’c’ is also where the bootstrap program resides, if the disk contains a root file system. See newfs(8).
FILES
/dev/zd[0-63][a-h]block files
/dev/rzd[0-63][a-h]raw files
/sys/conf/conf_zd.cbinary configuration file
SEE ALSO
newfs(8), zdformat(8S)
“Building DYNIX Systems with Config”
Balance System Administrator’s Guide
DIAGNOSTICS
Errors during normal operation are signaled to the driver via completion codes in the command block or by controller error interrupts. In response to an error, the driver makes every reasonable attempt to complete the I/O request and to avoid panicking the system. Therefore, the driver will choose to shut down a DCC channel or entire DCC controller rather than panic the system. To shut down a DCC channel or controller means that all the drives on the DCC channel or controller are marked as bad and all the queued I/O requests are failed.
Most completion code errors are reported in the following form:
zd%d%c: Error (specific error message); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
where “zd%d%c” defines the controller (zd), driver (%d) and partition (%c); “cmd 0x%x” is the DCC command active when the error occurred; and “(%d, %d, %d)” is the disk address (cylinder, track, sector) where the error occurred.
The following list describes the types of errors reported (and the corresponding action taken) by the driver.
zd%d%c: Hard Error (Write protect fault); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
Attempted to write to a write protected disk! The driver logs the failure and fails the I/O request.
zd%d%c: Error (Drive Fault); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
A drive fault was reported from the disk drive. Frequent occurrences indicate a suspect disk drive. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the drive is marked as bad and the current request as well as all I/O requests queued to the drive are failed.
zd%d%c: Error (Seek error); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
A seek error was reported from the disk drive. Frequent occurrences indicate a suspect disk drive. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the drive is marked as bad and the current request as well as all I/O requests queued to the drive are failed.
zd%d%c: Error (Seek timeout); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
A seek was started and has not completed. This may indicate a problem with either the disk drive or the DCC hardware. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the drive is marked as bad and the current request as well as all I/O requests queued to the drive are failed.
zd%d%c: Error (Channel timeout); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
A channel operation was started for which an interrupt was not received within 100 milliseconds. This indicates that this DCC channel hardware is suspect. The driver logs the failure and retries the request zdretry times. If the failure persists, the I/O request is failed and the driver proceeds to shut down the channel. That is, all drives on the channel are marked as bad and all queued I/O requests to the drives on the channel are failed.
zd%d%c: Hard Error (DMA timeout); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
A DMA transfer was started for which an interrupt was not received within 100 milliseconds. This indicates suspect DMA hardware on the DCC. The driver logs the failure and fails the I/O request. The driver then proceeds to shut down the channel. That is, all drives on the channel are marked as bad and all queued I/O requests to the drives on the channel are failed.
zd%d%c: Error (Header ECC error); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
A CRC error in the header of the sector was detected. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the I/O request is failed.
zd%d%c: Soft ECC error at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
An ECC error in the data portion of the sector was detected and successfully read via retries without correction. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The driver logs this failure and completes the I/O request.
zd%d%c: Correctable ECC error at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
An ECC error in the data portion of the sector was detected and successfully corrected. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The driver logs this failure and completes the I/O request.
zd%d%c: Hard Error (Uncorrectable ECC error); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
An ECC error in the data portion of the sector was detected and could not be corrected. The sector denoted by (%d, %d, %d) is corrupted and should be added to the bad block list via the addbad option of the stand-alone zdformat program. The driver logs the failure and fails the I/O request.
zd%d%c: Error (Sector not found); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
This indicates that the DCC was unable to locate a sector with the header bytes matching the address (%d, %d, %d). This may be caused by either a bad header or a seek to the wrong cylinder. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The type given to addbad should be that of an error in the header. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the I/O request is failed.
zd%d%c: Hard Error (Bad data sector); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
This indicates that auto-revectoring was inhibited. Since this is never done by the driver, DCC microcode is suspect. The driver logs the failure and proceeds to shut down the controller.
zd%d%c: Error (Sector overrun); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
This indicates that the DCC unexpectedly encounters a sector pulse. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The type given to addbad should be that of an error in the header. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the I/O request is failed.
zd%d%c: Error (No data synch); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
This sector on disk is suspect. If this sector on this disk continues to receive such errors, the sector should be added to the bad block list via the addbad option of the stand-alone zdformat program. The error type given to addbad should be that of an error in data. The driver logs the failure, issues a ZDC_RESET command, and retries the request zdretry times. The ZDC_RESET command is issued on every retry. If the failure persists, the I/O request is failed.
zd%d%c: Error (Fifo data lost); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
Repeated occurrences of this error indicate a suspect channel on the DCC. The driver logs the failure and retries the request zdretry times. If the failure persists, the I/O request is failed and the driver proceeds to shut down the channel. That is, all drives on the channel are marked as bad and all queued I/O requests to the drives on the channel are failed.
zd%d%c: Hard Error (Illegal cb_cmd); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the command block contains a valid command the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the command block contains an invalid command, the driver panics the system.
zd%d%c: Hard Error (Illegal cb_mod); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the command block contains a valid command modifier, the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the command block contains an invalid command modifier, the driver panics the system.
zd%d%c: Hard Error (Illegal disk address); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the command block contains a valid disk address, the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the command block contains an invalid disk address, the driver panics the system.
zd%d%c: Hard Error (cb_addr not 16-byte aligned); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the contents of the command block field "cb_addr" is 16-byte aligned, the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the contents of the command block field "cb_addr" is not 16-byte aligned, the driver panics the system.
zd%d%c: Hard Error (Illegal cb_count); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the contents of the command block field "cb_count" is non-zero and is a multiple of 16, the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the command block contains an invalid count, the driver panics the system.
zd%d%c: Hard Error (cb_iovec not 32-byte aligned); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The driver logs the failure. If the contents of the command block field "cb_iovec" is 32-byte aligned, the driver assumes the DCC is unreliable and proceeds to shut down the controller. If the contents of the command block field "cb_iovec" is not 32-byte aligned, the driver panics the system.
zd%d%c: Hard Error (Non-zero cb_iovec and page size invalid); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
This indicates that the DCC microcode was not initialized with the system page size. Since the DCC is initialized with the system page size, the DCC is suspect. The driver logs the failure and proceeds to shut down the controller.
zd%d%c: Hard Error (Illegal icb_pagesize); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
This indicates the DCC was initialized with an illegal page size. The DCC is suspect. The driver logs the failure and proceeds to shut down the controller.
zd%d%c: Hard Error (icb_dumpaddr not 16-byte aligned); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
This error can occur only during initialization. The DCC is suspect. The driver logs the failure and proceeds to shut down the controller.
zd%d%c: Hard Error (Bad drive); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
This indicates that the disk drive is not online and formatted, matching the channel format. It is typically the case that the drive went offline unexpectedly. The driver logs the failure, the drive is marked as bad, and the current I/O request as well as all queued requests are failed.
zd%d%c: Hard Error (In-use CB reused); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
The DCC received a request on an active command block. This indicates suspect software or DCC microcode. The driver logs the failure and immediately panics the system.
zd%d: Access error on transfer starting at physical address 0x%x.
Access Error Register = %x
Timeout error on write with memory access.
This can be caused from either a software/microcode bug or hardware failure. The driver logs the failure. If the failure is due to an uncorrectable memory error, the driver panics the system. Otherwise the driver fails the current I/O request and marks all drives on the DCC channel as bad. All I/O requests queued to the drives on the channel are failed. The driver then clears the DCC’s access error register to notify the DCC microcode that the access error has been cleared.
zd%d%c: Hard Error (Channel was reset); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
This indicates a suspect disk drive. The driver logs the failure, the drive is marked as bad, and the current I/O request as well as all queued requests are failed.
zd%d%c: Hard Error (Unexpected status from DDC); cmd 0x%x at (%d, %d, %d).
zd%d%c: Filesystem blkno = %d.
zd%d%c: cbstatus: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x
This indicates a suspect disk drive. The driver logs the failure, the drive is marked as bad, and the current I/O request as well as all queued requests are failed.
Controller error interrupts cause the driver to shut down the complete controller. The driver logs the error with the following message:
zdc%d: controller interrupt - SL_Z_STATUS == 0x%x.
The SL_Z_STATUS register contains the encoded error code. These codes are defined in the header file /usr/include/zdc/zdc.h. If the SL_Z_STATUS value is ZDC_OBCB, the driver assumes that the DCC received a stray interrupt and ignores the error. All other cases cause the controller to be shut down.
DYNIX