DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

hd(HW)


hd -- hard disk drive

Description

The information on this page is provided for compatibility with applications built on previous releases. See the sd01(HW) manual page for a description of the Release 6 interface, which also supports the functionality described on this page.

Block special files allow access to hard disks via the operating system's buffer cache mechanism. Block-buffered access to the primary hard disk is provided through the following block special files: hd00, hd01 through hd04, hd0a, hd0d, boot, swap, and root. hd00 refers to the entire physical disk; hd01 through hd04 refer to fdisk(ADM) partitions. boot refers to the boot filesystem (mounted as /stand), swap to the swap area, and root to the root filesystem (mounted as /). Block-buffered access to a secondary hard disk is provided through the special files: hd10, hd11 through hd14, and hd1a.

Character special files follow the same naming convention as the block special files except that the character special file is prefaced with an ``r'' (for ``raw'' or character device). For example, the character special file referring to the entire physical primary disk is /dev/rhd00.

Device names such as /dev/hd01 and /dev/rhd01 follow the XENIX® naming convention. Equivalent UNIX® system devices are found in the /dev/dsk (block) and /dev/rdsk (raw) directories. XENIX devices extend only to the primary and secondary hard disks; beyond this, UNIX system devices must be used. ``Minor device bits'' shows the third and fourth device nodes (/dev/dsk/2s0 and /dev/dsk/3s0). Following this scheme, disk five would correspond to /dev/dsk/4s0, disk six to /dev/dsk/5s0, and so on for the physical disk devices.

The following table shows both XENIX and UNIX system devices for the primary and secondary hard disks:

Block and character device filenames for hard disks

Primary disk Secondary disk Partition
/dev/hd00 /dev/dsk/0s0 /dev/hd10 /dev/dsk/1s0 entire disk
/dev/rhd00 /dev/rdsk/0s0 /dev/rhd10 /dev/rdsk/1s0
/dev/hd01 /dev/dsk/0s1 /dev/hd11 /dev/dsk/1s1 first partition
/dev/rhd01 /dev/rdsk/0s1 /dev/rhd11 /dev/rdsk/1s1
/dev/hd02 /dev/dsk/0s2 /dev/hd12 /dev/dsk/1s2 second partition
/dev/rhd02 /dev/rdsk/0s2 /dev/rhd12 /dev/rdsk/1s2
/dev/hd03 /dev/dsk/0s3 /dev/hd13 /dev/dsk/1s3 third partition
/dev/rhd03 /dev/rdsk/0s3 /dev/rhd13 /dev/rdsk/1s3
/dev/hd04 /dev/dsk/0s4 /dev/hd14 /dev/dsk/1s4 fourth partition
/dev/rhd04 /dev/rdsk/0s4 /dev/rhd14 /dev/rdsk/1s4
/dev/hd0a /dev/dsk/0sa active partition
/dev/rhd0a /dev/rdsk/0sa
/dev/hd0d /dev/dsk/0sd /dev/hd1d /dev/dsk/1sd DOS partition
/dev/rhd0d /dev/rdsk/0sd /dev/rhd1d /dev/rdsk/1sd

 +-------------+---------------+----------------+---------------+------------------+
 |Primary disk |               | Secondary disk |               | Partition        |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd00    | /dev/dsk/0s0  | /dev/hd10      | /dev/dsk/1s0  | entire disk      |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd00   | /dev/rdsk/0s0 | /dev/rhd10     | /dev/rdsk/1s0 |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd01    | /dev/dsk/0s1  | /dev/hd11      | /dev/dsk/1s1  | first partition  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd01   | /dev/rdsk/0s1 | /dev/rhd11     | /dev/rdsk/1s1 |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd02    | /dev/dsk/0s2  | /dev/hd12      | /dev/dsk/1s2  | second partition |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd02   | /dev/rdsk/0s2 | /dev/rhd12     | /dev/rdsk/1s2 |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd03    | /dev/dsk/0s3  | /dev/hd13      | /dev/dsk/1s3  | third partition  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd03   | /dev/rdsk/0s3 | /dev/rhd13     | /dev/rdsk/1s3 |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd04    | /dev/dsk/0s4  | /dev/hd14      | /dev/dsk/1s4  | fourth partition |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd04   | /dev/rdsk/0s4 | /dev/rhd14     | /dev/rdsk/1s4 |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd0a    | /dev/dsk/0sa  |                |               | active partition |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd0a   | /dev/rdsk/0sa |                |               |                  |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/hd0d    | /dev/dsk/0sd  | /dev/hd1d      | /dev/dsk/1sd  | DOS partition    |
 +-------------+---------------+----------------+---------------+------------------+
 |/dev/rhd0d   | /dev/rdsk/0sd | /dev/rhd1d     | /dev/rdsk/1sd |                  |
 +-------------+---------------+----------------+---------------+------------------+

Minor device numbering scheme

The scheme of the minor device number bit representation for hard disks is show in the following table:

Hard disk minor device bit representation

Bits
7 6 5 4 3 2 1 0 Description
X X - - - - - - disk # (0-3)
- - X X X - - - partition # (1-4)
- - - - - X X X division # (0-6)
- - X X X 1 1 1 whole partition
- - 0 0 0 0 0 0 whole physical disk
- - 1 0 1 - - - active partition
- - 1 1 0 - - - DOS partition
- - 1 1 0 X X X DOS drive (C-J)

 +-----------------------+---------------------+
 |         Bits          |                     |
 +--+--+--+--+--+--+--+--+---------------------+
 |7 |6 |5 |4 |3 |2 |1 |0 | Description         |
 +--+--+--+--+--+--+--+--+---------------------+
 |X |X |- |- |- |- |- |- | disk # (0-3)        |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |X |X |X |- |- |- | partition # (1-4)   |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |- |- |- |X |X |X | division # (0-6)    |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |X |X |X |1 |1 |1 | whole partition     |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |0 |0 |0 |0 |0 |0 | whole physical disk |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |1 |0 |1 |- |- |- | active partition    |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |1 |1 |0 |- |- |- | DOS partition       |
 +--+--+--+--+--+--+--+--+---------------------+
 |- |- |1 |1 |0 |X |X |X | DOS drive (C-J)     |
 +--+--+--+--+--+--+--+--+---------------------+
Because some SCSI controllers support large numbers of physical drives, an extended minor device numbering scheme is provided for those devices requiring more than 256 minor numbers.

Each driver that uses extended minor numbers has a base major number which is used to refer to the driver through the extended minor numbers. The driver has a normal entry in the mdevice(F) table for the base major number, plus one additional entry for each group of 256 minor devices that the driver uses.

Additional entries are identified by the ``M'' flag in the driver's device characteristics field. The ``M'' flag indicates that the entry corresponds to a virtual major number that points to a device driver that uses extended minor numbers. Therefore a large array of disks may sometimes have two (or more) major numbers; the first will correspond to minor numbers 0 through 255, the second to minor devices 256 through 511, and so on.

See scsidisk(HW) for other information that is specific to SCSI hard disks.

The following table lists the minor device number definitions for the hard disk special files, along with examples. Note that block and character special devices share the same minor device number. The minor device bits for DOS disk special files are listed in a separate table.

Minor device bits

Disk  Partition  Division Block interface Description
7 6  5 4 3  2 1 0 device name  
0 0 0 0 0 0 0 0 /dev/hd00 whole PD 0 (primary)
/dev/dsk/0s0  
0 0 0 0 1 1 1 1 /dev/hd01 PD 0, whole FP 1
0 0 0 1 0 1 1 1 /dev/hd02 PD 0, whole FP 2
0 0 0 1 1 1 1 1 /dev/hd03 PD 0, whole FP 3
0 0 1 0 0 1 1 1 /dev/hd04 PD 0, whole FP 4
0 0 1 0 1 1 1 1 /dev/hd0a PD 0, whole active FP
0 0 1 0 1 0 0 0 /dev/boot PD 0, active partition, DP 0
0 0 1 0 1 0 0 1 /dev/swap PD 0, active partition, DP 1
0 0 1 0 1 0 1 0 /dev/root PD 0, active partition, DP 2
0 0 1 0 1 0 1 1 /dev/u * PD 0, active partition, DP 3
0 0 1 0 1 1 1 0 /dev/recover PD 0, active partition, DP 6
0 1 0 0 0 0 0 0 /dev/hd10 whole PD 1 (secondary)
/dev/dsk/1s0  
0 1 0 0 1 1 1 1 /dev/hd11 PD 1, whole FP 1
0 1 0 1 0 1 1 1 /dev/hd12 PD 1, whole FP 2
0 1 0 1 1 1 1 1 /dev/hd13 PD 1, whole FP 3
0 1 1 0 0 1 1 1 /dev/hd14 PD 1, whole FP 4
0 1 1 0 1 1 1 1 /dev/hd1a PD 1, whole active FP
0 1 1 0 1 0 0 0 /dev/u0 * PD 1, active partition, DP 0
0 1 1 0 1 0 0 1 /dev/u1 * PD 1, active partition, DP 1
0 1 1 0 1 0 1 0 /dev/u2 * PD 1, active partition, DP 2
1 0 0 0 0 0 0 0 /dev/dsk/2s0 whole PD 2
1 0 0 0 1 1 1 1 /dev/dsk/2s1 PD 2, whole FP 1
1 0 0 1 0 1 1 1 /dev/dsk/2s2 PD 2, whole FP 2
1 0 0 1 1 1 1 1 /dev/dsk/2s3 PD 2, whole FP 3
1 0 1 0 0 1 1 1 /dev/dsk/2s4 PD 2, whole FP 4
1 0 1 0 1 1 1 1 /dev/dsk/2sa PD 2, whole active FP
1 1 0 0 0 0 0 0 /dev/dsk/3s0 whole PD 3
1 1 0 0 1 1 1 1 /dev/dsk/3s1 PD 3, whole FP 1
1 1 0 1 0 1 1 1 /dev/dsk/3s2 PD 3, whole FP 2
1 1 0 1 1 1 1 1 /dev/dsk/3s3 PD 3, whole FP 3
1 1 1 0 0 1 1 1 /dev/dsk/3s4 PD 3, whole FP 4
1 1 1 0 1 1 1 1 /dev/dsk/3sa PD 3, whole active FP
Key FP = fdisk partition PD = physical drive
  DP = division (divvy partition) * = user-defined name

 +-----+------------+-----------+-----------------+------------------------------+
 |Disk |  Partition |  Division | Block interface | Description                  |
 +-----+------------+-----------+-----------------+------------------------------+
 |7 6  |  5 4 3     |  2 1 0    | device name     |                              |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   0 0 0    |   0 0 0   | /dev/hd00       | whole PD 0 (primary)         |
 +-----+------------+-----------+-----------------+------------------------------+
 |     |            |           | /dev/dsk/0s0    |                              |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   0 0 1    |   1 1 1   | /dev/hd01       | PD 0, whole FP 1             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   0 1 0    |   1 1 1   | /dev/hd02       | PD 0, whole FP 2             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   0 1 1    |   1 1 1   | /dev/hd03       | PD 0, whole FP 3             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 0    |   1 1 1   | /dev/hd04       | PD 0, whole FP 4             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   1 1 1   | /dev/hd0a       | PD 0, whole active FP        |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   0 0 0   | /dev/boot       | PD 0, active partition, DP 0 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   0 0 1   | /dev/swap       | PD 0, active partition, DP 1 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   0 1 0   | /dev/root       | PD 0, active partition, DP 2 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   0 1 1   | /dev/u *        | PD 0, active partition, DP 3 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 0  |   1 0 1    |   1 1 0   | /dev/recover    | PD 0, active partition, DP 6 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   0 0 0    |   0 0 0   | /dev/hd10       | whole PD 1 (secondary)       |
 +-----+------------+-----------+-----------------+------------------------------+
 |     |            |           | /dev/dsk/1s0    |                              |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   0 0 1    |   1 1 1   | /dev/hd11       | PD 1, whole FP 1             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   0 1 0    |   1 1 1   | /dev/hd12       | PD 1, whole FP 2             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   0 1 1    |   1 1 1   | /dev/hd13       | PD 1, whole FP 3             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   1 0 0    |   1 1 1   | /dev/hd14       | PD 1, whole FP 4             |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   1 0 1    |   1 1 1   | /dev/hd1a       | PD 1, whole active FP        |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   1 0 1    |   0 0 0   | /dev/u0 *       | PD 1, active partition, DP 0 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   1 0 1    |   0 0 1   | /dev/u1 *       | PD 1, active partition, DP 1 |
 +-----+------------+-----------+-----------------+------------------------------+
 |0 1  |   1 0 1    |   0 1 0   | /dev/u2 *       | PD 1, active partition, DP 2 |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   0 0 0    |   0 0 0   | /dev/dsk/2s0    | whole PD 2                   |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   0 0 1    |   1 1 1   | /dev/dsk/2s1    | PD 2, whole FP 1             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   0 1 0    |   1 1 1   | /dev/dsk/2s2    | PD 2, whole FP 2             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   0 1 1    |   1 1 1   | /dev/dsk/2s3    | PD 2, whole FP 3             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   1 0 0    |   1 1 1   | /dev/dsk/2s4    | PD 2, whole FP 4             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 0  |   1 0 1    |   1 1 1   | /dev/dsk/2sa    | PD 2, whole active FP        |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   0 0 0    |   0 0 0   | /dev/dsk/3s0    | whole PD 3                   |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   0 0 1    |   1 1 1   | /dev/dsk/3s1    | PD 3, whole FP 1             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   0 1 0    |   1 1 1   | /dev/dsk/3s2    | PD 3, whole FP 2             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   0 1 1    |   1 1 1   | /dev/dsk/3s3    | PD 3, whole FP 3             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   1 0 0    |   1 1 1   | /dev/dsk/3s4    | PD 3, whole FP 4             |
 +-----+------------+-----------+-----------------+------------------------------+
 |1 1  |   1 0 1    |   1 1 1   | /dev/dsk/3sa    | PD 3, whole active FP        |
 +-----+------------+-----------+-----------------+------------------------------+
 |Key  | FP = fdisk partition                     | PD = physical drive          |
 +-----+------------------------------------------+------------------------------+
 |     | DP = division (divvy partition)          | * = user-defined name        |
 +-----+------------------------------------------+------------------------------+
The device files u and u[0-2] are optional filesystem names; these nodes are not present unless created by the system administrator.

On the first disk, hd00 denotes the entire disk and is used to access the master boot block, which includes the fdisk partition table. For the second disk, hd10 denotes the entire disk and is used to access its fdisk partition table.

DOS minor device bits

Disk  Partition  Division Device special Description
7 6  5 4 3  2 1 0 file name  
0 0 1 1 0 0 0 0 /dev/dsk/0sC PD 0, PDP, logical drive C
0 0 1 1 0 0 0 1 /dev/dsk/0sD PD 0, EDP, logical drive D
0 0 1 1 0 0 1 0 /dev/dsk/0sE PD 0, EDP, logical drive E
0 0 1 1 0 0 1 1 /dev/dsk/0sF PD 0, EDP, logical drive F
0 0 1 1 0 1 0 0 /dev/dsk/0sG PD 0, EDP, logical drive G
0 0 1 1 0 1 0 1 /dev/dsk/0sH PD 0, EDP, logical drive H
0 0 1 1 0 1 1 0 /dev/dsk/0sI PD 0, EDP, logical drive I
0 0 1 1 0 1 1 1 /dev/dsk/0sJ PD 0, EDP, logical drive J

       
0 1 1 1 0 0 0 0 /dev/dsk/1sC PD 1, PDP, logical drive C
0 1 1 1 0 0 0 1 /dev/dsk/1sD PD 1, EDP, logical drive D
0 1 1 1 0 0 1 0 /dev/dsk/1sE PD 1, EDP, logical drive E
0 1 1 1 0 0 1 1 /dev/dsk/1sF PD 1, EDP, logical drive F
0 1 1 1 0 1 0 0 /dev/dsk/1sG PD 1, EDP, logical drive G
0 1 1 1 0 1 0 1 /dev/dsk/1sH PD 1, EDP, logical drive H
0 1 1 1 0 1 1 0 /dev/dsk/1sI PD 1, EDP, logical drive I
0 1 1 1 0 1 1 1 /dev/dsk/1sJ PD 1, EDP, logical drive J

       
1 0 1 1 0 0 0 0 /dev/dsk/2sC PD 2, PDP, logical drive C
1 0 1 1 0 0 0 1 /dev/dsk/2sD PD 2, EDP, logical drive D
1 0 1 1 0 0 1 0 /dev/dsk/2sE PD 2, EDP, logical drive E
1 0 1 1 0 0 1 1 /dev/dsk/2sF PD 2, EDP, logical drive F
1 0 1 1 0 1 0 0 /dev/dsk/2sG PD 2, EDP, logical drive G
1 0 1 1 0 1 0 1 /dev/dsk/2sH PD 2, EDP, logical drive H
1 0 1 1 0 1 1 0 /dev/dsk/2sI PD 2, EDP, logical drive I
1 0 1 1 0 1 1 1 /dev/dsk/2sJ PD 2, EDP, logical drive J

       
1 1 1 1 0 0 0 0 /dev/dsk/3sC PD 3, PDP, logical drive C
1 1 1 1 0 0 0 1 /dev/dsk/3sD PD 3, EDP, logical drive D
1 1 1 1 0 0 1 0 /dev/dsk/3sE PD 3, EDP, logical drive E
1 1 1 1 0 0 1 1 /dev/dsk/3sF PD 3, EDP, logical drive F
1 1 1 1 0 1 0 0 /dev/dsk/3sG PD 3, EDP, logical drive G
1 1 1 1 0 1 0 1 /dev/dsk/3sH PD 3, EDP, logical drive H
1 1 1 1 0 1 1 0 /dev/dsk/3sI PD 3, EDP, logical drive I
1 1 1 1 0 1 1 1 /dev/dsk/3sJ PD 3, EDP, logical drive J
Key PDP = primary DOS partition EDP = extended DOS partition

 +-----+------------+-----------+----------------+------------------------------+
 |Disk |  Partition |  Division | Device special | Description                  |
 +-----+------------+-----------+----------------+------------------------------+
 |7 6  |  5 4 3     |  2 1 0    | file name      |                              |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   0 0 0   | /dev/dsk/0sC   | PD 0, PDP, logical drive C   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   0 0 1   | /dev/dsk/0sD   | PD 0, EDP, logical drive D   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   0 1 0   | /dev/dsk/0sE   | PD 0, EDP, logical drive E   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   0 1 1   | /dev/dsk/0sF   | PD 0, EDP, logical drive F   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   1 0 0   | /dev/dsk/0sG   | PD 0, EDP, logical drive G   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   1 0 1   | /dev/dsk/0sH   | PD 0, EDP, logical drive H   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   1 1 0   | /dev/dsk/0sI   | PD 0, EDP, logical drive I   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 0  |   1 1 0    |   1 1 1   | /dev/dsk/0sJ   | PD 0, EDP, logical drive J   |
 +-----+------------+-----------+----------------+------------------------------+
 |     |            |           |                |                              |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   0 0 0   | /dev/dsk/1sC   | PD 1, PDP, logical drive C   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   0 0 1   | /dev/dsk/1sD   | PD 1, EDP, logical drive D   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   0 1 0   | /dev/dsk/1sE   | PD 1, EDP, logical drive E   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   0 1 1   | /dev/dsk/1sF   | PD 1, EDP, logical drive F   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   1 0 0   | /dev/dsk/1sG   | PD 1, EDP, logical drive G   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   1 0 1   | /dev/dsk/1sH   | PD 1, EDP, logical drive H   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   1 1 0   | /dev/dsk/1sI   | PD 1, EDP, logical drive I   |
 +-----+------------+-----------+----------------+------------------------------+
 |0 1  |   1 1 0    |   1 1 1   | /dev/dsk/1sJ   | PD 1, EDP, logical drive J   |
 +-----+------------+-----------+----------------+------------------------------+
 |     |            |           |                |                              |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   0 0 0   | /dev/dsk/2sC   | PD 2, PDP, logical drive C   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   0 0 1   | /dev/dsk/2sD   | PD 2, EDP, logical drive D   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   0 1 0   | /dev/dsk/2sE   | PD 2, EDP, logical drive E   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   0 1 1   | /dev/dsk/2sF   | PD 2, EDP, logical drive F   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   1 0 0   | /dev/dsk/2sG   | PD 2, EDP, logical drive G   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   1 0 1   | /dev/dsk/2sH   | PD 2, EDP, logical drive H   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   1 1 0   | /dev/dsk/2sI   | PD 2, EDP, logical drive I   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 0  |   1 1 0    |   1 1 1   | /dev/dsk/2sJ   | PD 2, EDP, logical drive J   |
 +-----+------------+-----------+----------------+------------------------------+
 |     |            |           |                |                              |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   0 0 0   | /dev/dsk/3sC   | PD 3, PDP, logical drive C   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   0 0 1   | /dev/dsk/3sD   | PD 3, EDP, logical drive D   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   0 1 0   | /dev/dsk/3sE   | PD 3, EDP, logical drive E   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   0 1 1   | /dev/dsk/3sF   | PD 3, EDP, logical drive F   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   1 0 0   | /dev/dsk/3sG   | PD 3, EDP, logical drive G   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   1 0 1   | /dev/dsk/3sH   | PD 3, EDP, logical drive H   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   1 1 0   | /dev/dsk/3sI   | PD 3, EDP, logical drive I   |
 +-----+------------+-----------+----------------+------------------------------+
 |1 1  |   1 1 0    |   1 1 1   | /dev/dsk/3sJ   | PD 3, EDP, logical drive J   |
 +-----+------------+-----------+----------------+------------------------------+
 |Key  | PDP = primary DOS partition             | EDP = extended DOS partition |
 +-----+-----------------------------------------+------------------------------+
Bits 5, 4, and 3 are set to ``110'' to signify that a partition is a DOS partition. The division number indexes the primary or extended logical DOS partitions in the order that they were created on the disk using fdisk.

The device file /dev/hd0d (first DOS partition) is linked to /dev/dsk/0sC for backwards compatibility. To access DOS partitions, specify letters such as ``C:'' or ``D:'' to indicate first or second partitions. The file /etc/default/msdos contains lines that assign a letter abbreviation for the DOS device name. Refer to doscmd(C).

An existing XENIX filesystem may be mounted on a UNIX system provided that a special device file is created in the /dev directory by adding device node entries to the file /etc/conf/node.d/hd and then running the idmknod(ADM) command. The major and minor device numbers that must be specified for the XENIX device file are calculated in exactly the same way as for a UNIX system. For example, to create character and block special files for the XENIX /u filesystem in division 2 of partition 3 on physical drive 0, follow these steps:

  1. Log in as root.

  2. Calculate the minor number for the device. Bits 7 and 6 of the minor device number specify the physical drive number; bit 5 is set to 0 (zero); bits 4 and 3 specify the partition; and bits 2, 1, and 0 specify the division. In this case, the minor device bit representation would be ``00011010''. This corresponds to a minor number of 26.

  3. Add the following entries to /etc/conf/node.d/hd for the block and character device files:
       hd dsk/0s3x b 26 sysinfo sysinfo 600
       hd rdsk/0s3x c 26 sysinfo sysinfo 600
    
    The naming convention for hard disk device files has been adapted by adding ``x'' to mean ``XENIX filesystem''.

  4. Create the new device nodes using the command:

    /etc/conf/bin/idmknod -s

  5. Use the Filesystem Manager to mount the XENIX filesystem on a suitable mount point such as /x.

Supported ioctls

The esdi, st506, ida, omti, wd1010, and Sdsk drivers support the following ioctl(S) commands, as well as the ioctl commands for asynchronous I/O described on aio(HW). These ioctls and the structures they use are defined in <sys/dio.h>.

Each ioctl command is performed on the partition indicated by the file descriptor passed to ioctl(S).

WARNING: DIOWPART, DWVDT, and DIOWDISK overwrite existing disk information. Data on the affected partition may be destroyed.


DIOGETP
Return disk parameters in the struct dparam pointed to by arg. [EFAULT] is set in errno if an invalid pointer was passed.

DIORPART
Return the division table for the partition. arg points to a struct partable in which the information is returned. The following errno values are possible, in addition to those described on the ioctl(S) manual page:

[ENXIO]
The operating system on the partition is neither UNIX nor XENIX.

[EFAULT]
No division table can be found for the partition, or an invalid pointer was passed.


DIOWPART
Write the division table from the struct partable pointed to by arg to the partition. Possible errno values include:

[ENXIO]
The operating system on the partition is neither UNIX nor XENIX, or the maximum amount of 4 virtual XENIX devices or 4 UNIX partitions per physical device has been reached. This limit is imposed by the PC BIOS.

[EFAULT]
An invalid pointer was passed.

DIOBITP
Return the number of bits used for each portion of the minor device in the struct dbitparams pointed to by arg. [EFAULT] is set in errno if an invalid pointer was passed.

DIORVDT
Return the partition table of the physical drive in the struct vdtab pointed to by arg. [EFAULT] is set in errno if an invalid pointer was passed.

DIOWVDT
Set the partition table of the physical drive to the struct vdtab pointed to by arg. Possible errno values include:

[EFAULT]
An invalid pointer was passed.

[ENXIO]
Either the masterboot disk table or the division table could not be read.

DIOSDISK
Return the number of entries in the masterboot disk table in arg, which should be a short. [EFAULT] is set in errno if there is a problem transferring data.

DIORDISK
Return a masterboot disk table entry in the array of 8 longs pointed to by arg. [EFAULT] is set in errno if an invalid pointer was passed.

DIOWDISK
Write a masterboot disk table entry. Not supported by the omti driver. Possible values for errno are:

[ENXIO]
The masterboot disk table could not be read, or the operating system is SCO UNIX 3.2.0 or earlier.

[EFAULT]
An invalid pointer was passed.

DIODKTYPE
Return the disk layout to which the driver is currently configured in arg, which should be a short. arg will be 1 if the disk layout mode is SCO UNIX 3.2.0, or 0 otherwise.

DIOFORCE22
Force the driver into SCO UNIX 3.2.0 disk layout mode. [EFAULT] is set in errno if problems occurred.

Diagnostics

The following error messages may be displayed on the console. See messages(M) for general information about kernel error messages, including a list of generic device driver errors.

esdi -- ESDI hard disk driver

WARNING: esdi: adapter reset failed
The adapter could not be reset.
WARNING: esdi: adapter reset failed - no status bsr
The adapter could not be reset; the BSR status register contained the value bsr.
WARNING: esdi: adapter reset command failed
Reset failed because an interrupt was present.
WARNING: esdi: error parking heads for drive n
An error occurred while parking the disk drive heads.
WARNING: esdi: esdiattention timeout - stat = n
The routine esdiattention in the driver timed out after requesting attention.
WARNING: esdi: get drive attention error
Could not get drive attention while testing the configuration.
WARNING: esdi: get drive command error
An error was detected in the command block sent to the controller on testing the configuration.
WARNING: esdi: get drive configuration failed
The drive configuration test failed.
WARNING: esdi: get drive interrupt bit not set
The drive configuration test failed because the drive interrupt status was not available.
WARNING: esdi: get drive no status block
The drive configuration test failed because the drive status block was not available.
WARNING: esdi: no controller installed
An ESDI controller could not be found.
WARNING: esdi: no drive n
A drive could not be opened because the physical device corresponding to the minor device number was not present.
WARNING: esdi: on fixed disk dev=major/minor block=n
         esdi: cmd=command, isr=completion_status, sir=error_code
DMA error still present after four retries.
WARNING: esdi: Reset failed isr=completion status
         esdi: status=n
The completion status after a reset still reported an error.
WARNING: esdi: timeout parking heads for drive n
A timeout occurred on parking the disk drive heads.

hd -- root hard disk driver

NOTICE: hd: Invalid hard disk partition sector on device major/minor
The root hard disk partition information could not be read on opening the drive.
WARNING: hd: multiple root disk controllers
More than one disk controller was found to be present; boot-time loading of a valid driver using the hd=driver keyword will override this error.
WARNING: hd: no controller
No disk controller was found.
WARNING: hd: no root disk controller
The root disk controller was not found on system initialization.
WARNING: Ignoring "hd=name" : Unknown driver
The hard disk device driver name specified in the bootstring could not be found.
PANIC: hd: devsw error
The driver was not found.
PANIC: hd: intsw error
The interrupt handler routine could not be patched.
PANIC: hd: multiple controllers
More than one disk controller was found to be present on booting up; boot-time loading of a valid driver using the hd=driver keyword will override this error.

ida -- Compaq EISA disk drive array (DISCO) driver

CONFIG: ida#: Vectors for controller in slot m differ (kernel=o, system=p)
The EISA configuration interrupt vector does not match that in sdevice(F).
NOTICE: ida#: n abort errors on dev major/minor unit m, block=n cmd=0xo status=0xp
Reports the number of abort errors.
NOTICE: ida#: n bad command lists on dev major/minor unit m, block=n cmd=0xo status=0xp
Reports the number of bad command lists.
NOTICE: ida#: n bad requests on dev major/minor unit m, block=n cmd=0xo
status=0xp
Reports the number of bad requests.
NOTICE: ida#: n recoverable errors on dev major/minor unit m, block=n cmd=0xo status=0xp
Reports the number of recoverable errors.
WARNING: ida: Cannot allocate nk, IDA disabled
Not enough memory was available to allocate to command blocks.
WARNING: ida: Only first six of n Disc Array Controllers supported
A maximum of six drive controllers can be attached.
WARNING: ida#: m non-recoverable errors on dev major/minor unit n, block=o cmd=0xp status=0xq
Reports the number of non-recoverable errors.
WARNING: ida#: m unknown errors on dev major/minor unit n, block=o cmd=0xp status=0xq
Reports the number of unknown errors.
WARNING: ida#: No queued requests
No request blocks were found for processing on update.
WARNING: ida#: Spurious interrupt
No command was pending when an interrupt was received.
WARNING: ida#: Unknown cmd=0xm on dev major/minor unit n, offset=0xo status=0xp
An unknown command was received.
PANIC: ida - ran out of cmdlist
No more command blocks were available.

omti -- OMTI disk driver

WARNING: omti: already busy
omtistart had already been called on a busy drive.
WARNING: omti: C_D bit stuck off
The controller failed to indicate its readiness for a command.
WARNING: omti: cannot enter command phase
The controller failed to accept the selected command.
WARNING: omti: colliding polling routines
A re-entrant call to omtipoll has been detected.
WARNING: omti: command setup failed
The controller failed to accept the setup command.
WARNING: omti: controller configured for no drive n
An open on a drive failed to identify the disk type.
WARNING: omti: error during OMTI_SENSE
An interrupt was received during an OMTI sense command.
WARNING: omti: error on fixed disk (minor minor), block=m
omti: Error Type n, Code o, Unit p
omti: Sector = q, Cylinder/head = r/s,
omti: msg
The OMTI sense error message msg provides more information about the error.

The following are possible drive errors:

Cartridge Changed	
Drive Not Selected/Not Ready
Multiple Drives Selected
No error or no sense information
No Index
No Seek/Command Complete
No Track zero or Cylinder zero found
Seek/Command in progress
Write/Drive Fault
The following are possible data errors:
Alternate of Bad Track Already Assigned
Bad Track Encountered
Correctable ECC
Data Address Mark Not Found
Error with unknown type and code
ID Address Mark Not Found
ID CRC
Illegal Access To An Alternated Track/Unable to Read the Alternate Track Address
Illegal Alternate Track Address
Illegal Disk Address
Illegal Interleave Factor
No Alternate Track Found
Sector Not Found
Seek Error
Sequence/DMA
Uncorrectable Data ECC
Unknown Error
Write Protected
The following are possible command errors:
Illegal Function for Drive Type
Invalid Command
Volume Overflow
The following are possible diagnostic errors:
EPROM Checksum/Internal Diagnostic error
RAM error
WARNING: omti: initialization failure
An error occurred during initialization.
WARNING: omti: non-omti interrupt (status)
The controller did not signal an interrupt when one was received.
WARNING: omti: OMTI_BUSY bit still stuck on
The controller failed to obey the reset command.
WARNING: omti: sense command setup failed
The controller failed to accept the setup command.
WARNING: omti: still busy
The controller is still busy after generating an interrupt.
WARNING: omti: timed out
An expected interrupt did not arrive.
WARNING: omti: unexpected interrupt (status)
No command was pending when an interrupt was received.
WARNING: omti: unknown command(n)
omtistart encountered an unrecognized command.
WARNING: omti: unloading all requests
The driver is preparing for manual reset because the programmed reset did not work.
WARNING: unexpected end of data phase
Abnormal termination of a data read.
WARNING: Please use sfmt to modify disk parameters
Attempt to write the disk characteristics directly using the DIOWDISK ioctl call.

st506 -- ST506 fixed disk adapter driver

This driver supports the ST506, the Adaptec 2610 and 2620, and the IBM 50-021, 50-031, 60-041, and 80-041.
WARNING: st506: Invalid fixed disk parameter table on dev major/minor
The disk information had been corrupted.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, ASR BUSY after reset
A reset failed on the adapter status register.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, ASR_BUSY set, command aborted
A command was aborted because the adapter is busy.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, CCB error, sector=m, cylinder/head=n/o
An error occurred with a command control block.
WARNING: st506: isr=status, error parking heads for drive n
An error occurred while parking the disk drive heads.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, initialization error, sending CSB
The error occurred while sending the command specify block.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, reading SSB
The sense summary block could not be read.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, sending data (possible bad track)
                drive=m, sector=n, cylinder/head=o/p
A possibly defective track was found on the disk.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, spurious interrupt

WARNING: st506: Error on fixed disk dev major/minor block=n st506: isr=status, spurious interrupt during unknown state

No command was pending when an interrupt was received.
WARNING: st506: Error on fixed disk dev major/minor block=n
         st506: isr=status, timeout, ASR BUSY waiting to read SSB
A command timed out because the adapter was busy waiting to read the sense summary block.

wd -- Western Digital 1010 disk controller driver

This driver is also used for the IBM 35SX, 40SX, L40SX, and for the TA Walkstation 386.
WARNING: wd#: Error on fixed disk dev major/minor, block=m, cmd=0xn
         status=0xerror, sector=o, cylinder/head=p/q
Reports an error detected while accessing the disk.

See also

divvy(ADM), doscmd(C), fdisk(ADM), idmknod(ADM), mdevice(F), mkdev(ADM), scsidisk(HW), sd01(HW)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005