System Administration Guide, Volume I

Files Used by format--format.dat

The format data file, /etc/format.dat, contains:

The format.dat file shipped with the Solaris operating environment supports many standard disks. If your disk drive is not listed in the format.dat file, you can choose to add an entry for it or allow format to prompt you for the information it needs while it is performing operations.

Adding an entry to the format.dat file can save time if the disk drive will be used throughout your site. To use the format.dat file on other systems, copy the file to each system that will use the specific disk drive you added to the format.dat file.

You should modify the data file for your system if you have one of the following:


Note -

Do not alter default entries. If you want to alter the default entries, copy the entry, give it a different name, and make the modification to avoid confusion.


Structure

The format.dat contains specific disk drive information used by the format utility. Three items are defined in the format.dat file:

Syntax

The following syntax rules apply to the data file:

Keywords

The data file contains disk definitions that are read in by format when it is started. Each definition starts with one of the following keywords: search_path, disk_type, and partition, which are described in Table 25-6.

Table 25-6 format.dat Keyword Descriptions

Keyword 

Use 

search_path

This keyword is no longer used in the format.dat file. Starting with the Solaris 2.0 release, the format utility searchs the logical device hierarchy (/dev)so there is no need to set this keyword to find a system's disks.

disk_type

Defines the controller and disk model. Each disk_type definition contains information concerning the physical geometry of the disk. The default data file contains definitions for the controllers and disks that the Solaris operating environment supports. You need to add a new disk_type only if you have an unsupported disk. You can add as many disk_type definitions to the data file as you want.

partition

Defines a slice table for a specific disk type. The slice table contains the slice information, plus a name that lets you refer to it in format. The default data file contains default slice definitions for several kinds of disk drives. Add a slice definition if you recreated slices on any of the disks on your system. Add as many slice definitions to the data file as you need.

Disk Type

disk_type defines the controller and disk model. Each disk_type definition contains the physical geometry of the disk. The default data file contains definitions for the controllers and disks that the Solaris operating environment supports. You need to add a new disk_type only if you have an unsupported disk. You can add as many disk_type definitions to the data file as you want.

The keyword itself is assigned the name of the disk type. This name appears in the disk's label, and is used to identify the disk type whenever format is run. Enclose the name in double quotes to preserve any white space in the name. Table 25-7 describes the identifiers that must also be assigned values in all disk_type definitions.

Table 25-7 Required disk_type Identifiers

Identifier 

Description 

ctlr

Valid controller type for the disk type. Currently, the supported values for this assignment are SCSI and ISP-80 (IPI controller).  

ncyl

The number of data cylinders in the disk type. This determines how many logical cylinders of the disk the system will be allowed to access.  

acyl

The number of alternate cylinders in the disk type. These cylinders are used by format to store information such as the defect list for the drive. You should always leave at least two cylinders for alternates.

pcyl

The number of physical cylinders in the disk type. This number is used to calculate the boundaries of the disk media. This number is usually equal to ncyl plus acyl.

nhead

The number of heads in the disk type. This number is used to calculate the boundaries of the disk media.  

nsect

The number of data sectors per track in the disk type. This number is used to calculate the boundaries of the disk media. Note that this is only the data sectors, any spares are not reflected in the assignment.  

rpm

The rotations per minute of the disk type. This information is put in the label and later used by the file system to calculate the optimal placement of file data.  

Other assignments may be necessary depending on the controller. Table 25-8 describes the assignments required for SCSI controllers.

Table 25-8 disk_type Identifiers for SCSI Controllers

Identifier 

Description 

fmt_time

A number indicating how long it takes to format a given drive. See the controller manual for more information.  

cache

A number that controls the operation of the onboard cache while format is operating. See the controller manual for more information.

trks_zone

A number that specified how many tracks you have per defect zone, to be used in alternate sector mapping. See the controller manual for more information.  

asect

The number assigned to this parameter specifies how many sectors are available for alternate mapping within a given defect zone. See the controller manual for more information.  

Below are some examples of disk_type definitions:


disk_type = "SUN0535" \
	: ctlr = SCSI : fmt_time = 4 \
	: ncyl = 1866 : acyl = 2 : pcyl = 2500 : nhead = 7 : nsect = 80 \
	: rpm = 5400
disk_type = "SUN0669" \
	: ctlr = SCSI : fmt_time = 4 \
	: trks_zone = 15 : asect = 5 : atrks = 30 \
	: ncyl =  1614 : acyl = 2 : pcyl = 1632 : nhead = 15 : nsect = 54 \
	: rpm = 3600 : bpt = 31410
disk_type = "SUN1.0G" \
	: ctlr = SCSI : fmt_time = 4 \
	: trks_zone = 15 : asect = 5 : atrks = 30 \
	: ncyl =  1703 : acyl = 2 : pcyl = 1931 : nhead = 15 : nsect = 80 \
	: rpm = 3597 : bpt = 41301

Slice Tables

A partition definition keyword is assigned the name of the slice table. Enclose the name in double quotes to preserve any white space in the name. Table 25-9 describes the identifiers that must be assigned values in all slice tables.

Table 25-9 Required Identifiers for Slice Tables

Identifier 

Description 

disk

The name of the disk_type that this slice table is defined for. This name must appear exactly as it does in the disk_type definition.

ctlr

The disk controller type this slice table can be attached to. Currently, the supported values for this assignment are ISP-80 for IPI controllers and SCSI for SCSI controllers. The controller type specified here must also be defined for the disk_type chosen above.

The other assignments in a slice definition describe the actual slice information. The identifiers are the numbers 0 through 7. These assignments are optional. Any slice not explicitly assigned is set to 0 length. The value of each of these assignments is a pair of numbers separated by a comma. The first number is the starting cylinder for the slice, and the second is the number of sectors in the slice. Below are some examples of slice definitions:


partition = "SUN0535" \
	: disk = "SUN0535" : ctlr = SCSI \
	: 0 = 0, 64400 : 1 = 115, 103600 : 2 = 0, 1044960 : 6 = 300, 876960
partition = "SUN0669" \
	: disk = "SUN0669" : ctlr = SCSI \
	: 0 = 0, 32400 : 1 = 40, 64800 : 2 = 0, 1307340 : 6 = 120, 1210140
partition = "SUN1.0G" \
	: disk = "SUN1.0G" : ctlr = SCSI \
	: 0 = 0, 32400 : 1 = 27, 64800 : 2 = 0, 2043600 : 6 = 81, 1946400

Location

The format utility learns of the location of your data file by the following methods.

  1. If a filename is given with the -x command line option, that file is always used as the data file.

  2. If the -x option is not specified, then format looks in the current directory for a file named format.dat. If the file exists, it is used as the data file.

  3. If neither of these methods yields a data file, format uses /etc/format.dat as the data file. This file is shipped with the Solaris operating environment and should always be present.