Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ disk(7) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cdrom(7)

floppy(7)

intro(7)

disk(7)  —  SPECIAL FILES AND DEVICES

NAME

disk − disk support

DESCRIPTION

All Motorola disks support dynamic slice sizing.  The Volume Table of Contents (VTOC) contains the slicing information for the disk.  Up to 16 slices may be specified.  Therefore, you do not have to configure the size and slicing of a disk into the driver.  You can attach any size disk without changing any configuration information. 

The raw device nodes /dev/rdsk/prefix_∗ allow the transfer of a specified number of bytes in multiples of physical sector size between the hard disk drive and a location in the user’s address space.  The typical number of bytes in a physical sector is 512. 

Disk devices may be removable or non-removable (fixed). 

IOCTL COMMANDS

Disk drivers support several ioctl(2) functions on the character or raw devices.  These functions permit control beyond the normal open(2), close(2), read(2), and write(2) system calls.  All ioctl(2) operations take the form ioctl (fildes, command, ∗arg).  Any attempt to utilize ioctl(2) functions not listed below causes an EINVAL error to be returned. 

The operations supported by disks are listed below in alphabetical order. 

DKFIXBADSPOT
Lock out a bad spot on the disk based on the information in the dkbadlst structure referenced by arg.  The dkbadlst structure is defined in sys/dk.h. 

DKFORMAT
Format a disk. The dkfmt structure is defined in sys/dk.h. 

DKGETCFG
Get parameters associated with the disk and store them in the dkconfig structure referenced by arg.  The dkconfig structure is defined in sys/dk.h.  The disk is not accessed by this command. 

DKGETINFO
Get parameters associated with the disk and store them in the dkblk0 structure referenced by arg.  The dkblk0 structure is defined in sys/dk.h.  The disk is not accessed by this command. 

DKGETSLC
Get the VTOC information for a disk and return the information in a structure of type struct motorola_vtoc (defined in sys/vtoc.h) referenced by arg.  While the number of supported slices is determined by the number of slices defined in the ddefs file, all disks are expected to support 16 slices.  The disk is not accessed by this command. 

DKSETCFG
Get parameters associated with the disk and store them in the dkconfig structure referenced by arg.  The disk is not accessed by this command. 

DKSETINFO
Set parameters associated with the disk based on the values in the dkblk0 structure referenced by arg.  The disk is not accessed by this command. 

DKSETSLC
Set the VTOC information for a disk and return the information in a structure of type struct motorola_vtoc (defined in sys/vtoc.h) referenced by arg.  The disk is not accessed by this command. 

DKINQUIRY
Return the SCSI INQUIRY data for the device; it is only valid for SCSI disks. This ioctl can be done on any device the calling process has open.  The SCSI INQUIRY data for the device is copied into the struct inquiry structure pointed to by arg.  The struct inquiry structure is defined in sys/dk.h. 

DKREADCAP
Return the SCSI READ CAPACITY data for the device; it is only valid for SCSI disks. This ioctl can be done on any disk or CDROM device the calling process has open.  The SCSI READ CAPACITY data for the device is copied into the struct readcap structure pointed to by arg.  The struct readcap structure is defined in sys/dk.h.  Note: the SCSI READ CAPACITY command returns the number of the last logical block on the media.  This ioctl adds one to that number so it represents the actual capacity of the device.  Logical block numbers start at zero. 

V_GETSSZ
Return the physical sector size of the CDROM. The arg parameter specifies a structure of type io_arg (defined in sys/vtoc.h).  The sectst and datasz members of the io_arg structure are ignored.  The memaddr member of the structure points to the address of an integer containing the sector size after a successful operation. 

V_PDREAD
Read the Physical Description Area of the disk. The arg parameter specifies a structure of type io_arg (defined in sys/vtoc.h).  The sectst and datasz members of the io_arg structure are ignored.  The memaddr member of the io_arg structure points to the address of a structure of type pdsector (defined in sys/vtoc.h) containing the requested data upon successful completion. 

V_PDWRITE
Write the Physical Description Area of the disk. The arg parameter specifies a structure of type pdinfo (defined in sys/vtoc.h).  The sectst and datasz members of the io_arg structure are ignored.  The memaddr member of the io_arg structure points to the address of a structure of type pdsector (defined in sys/vtoc.h) containing the requested data upon successful completion. 

V_PREAD
Read sectors. This interface assumes sectors are 512 bytes in length so the driver is responsible for mapping the requested block(s) to the correct portion of the correct sector on the disk regardless of the actual physical sector size. The arg parameter specifies a structure of type io_arg (defined in sys/vtoc.h).  The sectst member of the io_arg structure contains the starting sector number and the datasz member contains the number of bytes (which must be a multiple of 512).  The memaddr member of the io_arg structure points to the address of a sufficiently large area containing the requested data upon successful completion. 

V_PWRITE
Write sectors. This interface assumes sectors are 512 bytes in length so the driver is responsible for mapping the requested block(s) to the correct portion of the correct sector on the disk regardless of the actual physical sector size. The arg parameter specifies a structure of type io_arg (defined in sys/vtoc.h).  The sectst member of the io_arg structure contains the starting sector number and the datasz member contains the number of sectors.  The memaddr member of the io_arg structure points to the address of a sufficiently large area containing the requested data upon successful completion. 

V_RVTOC
Read the VTOC from the disk. The arg parameter specifies a structure of type io_arg (defined in sys/vtoc.h).  The sectst and datasz members of the io_arg structure are ignored.  The memaddr member of the io_arg structure points to the address of a structure of type vtoc (defined in sys/vtoc.h) containing the requested data upon successful completion. 

V_WVTOC
Write the VTOC to the disk. The arg parameter specifies a structure of type vtoc (defined in sys/vtoc.h).  The sectst and datasz members of the io_arg structure are ignored.  The memaddr member of the io_arg structure points to the address of a structure of type vtoc (defined in sys/vtoc.h) containing the requested data upon successful completion. 

DINIT CONSIDERATIONS

The utility dinit(1M) initially formats the disk and fixes any new bad spots occurring over time.  Although a device driver redirects all future operations away from new bad spots, any existing data in the bad block is lost.  Always use the −s option to dinit when attempting to fix new bad spots. 

DDEFS CONSIDERATIONS

The utility ddefs defines disk characteristics.  The output of the ddefs utility is a file normally saved in the /etc/dskdefs directory.  This file is used as input to the dinit(1M) utility when it initializes a disk. 

A brief description of the important fields follows. 

Comment
Identification of the ddefs file to the user. 

Disk type
Decimal equivalent of a two-byte field. Upper byte is the SCSI controller type; lower byte is the peripheral type. This field is not currently used by the MVME328 and SCSI1X7 drivers. Valid disk types are:

CONTROLLER PERIPHERAL DISK
DISK TYPE TYPE TYPE
mcdcIII 0x13 0x02 4098
mcdcIV 0x13 0x02 4866
mcdcV 0x13 0x02 4866
mcdcVII 0x13 0x02 4866
mfuj2613 0x13 0x02 4866
mfuj2614 0x13 0x02 4866
mfuj2624 0x13 0x02 4866

Format command
Used by dinit(1M) for formatting.  It is set to none for the MVME328 and SCSI1X7. 

Diagnostic tracks
Used by dinit(1M) to write diagnostic tracks on the disk.  The default value for the MVME328 and SCSI1X7 is no. 

Bad spot strategy
The MVME328 and SCSI1X7 drivers consider all media as PERFECT.

Maximum number of bad spots
The maximum number of new bad spots that can be added.

Number of sectors
The total number of sectors on the disk.

Sector size
The physical sector size of the disk.

Sectors per track
The number of sectors per track on the disk.

Cylinders
The total number of cylinders on the disk.

Heads
The number of heads on the disk.

The following fields are not used by the MVME328 and SCSI1X7: Precompensation cylinder, Sector interleave, Spiral offset, Step rate, Starting head number, ECC error length, Attributes mask, Extended attributes mask, Attributes word, Gap byte 1, Gap byte 2, Gap byte 3, Gap byte 4, and Unformatted sector size. 

Controller Attributes Word
Identifies various characteristics of the disk controller configuration, as shown in the following table:

DEFINITION SET(1) RESET(0)
0x01000 Don’t stop format if p/g list inaccessible Stop format if inaccessible
0x10000 Don’t turn on drive cache Turn on drive cache
0x00800 Defect management zone = cylinder Defect management zone = track

These are the only flags currently used by the MVME328 and SCSI1X7 device drivers. 

Sector slip count
Indicates the number of spare sectors to be reserved for the defined defect management zone. Note: changing this value can affect the usable capacity of the drive.

The following ddefs utility fields are ignored: root file system offset, root file system size, /usr file system size, /usr file system slice, swap size, and swap slice.  The following ddefs utility fields have values entered based on how the disk is to be used: slice count and end-of-disk reserved area. 

Alternates
This number is multiplied by the number of heads to determine the number of spare tracks to be reserved at the end of the drive for defect management. Note: changing this value can affect the usable capacity of the drive.

SEE ALSO

cdrom(7), floppy(7), intro(7)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026