Contents of the format.dat File
The format.dat contains specific disk drive information
that is used by the format utility. Three items are defined
in the format.dat file:
Search paths
Disk types
Slice tables
Syntax of the format.dat File
The following syntax rules apply to the /etc/format.dat
file:
The pound sign (#) is the comment character.
Any text on a line after a pound sign is not interpreted by the format utility.
Each definition in the format.dat file
appears on a single logical line. If the definition is longer than one line
long, all but the last line of the definition must end with a backslash (\).
A definition consists of a series of assignments that have
an identifier on the left side and one or more values on the right side. The
assignment operator is the equal sign (=). The assignments
within a definition must be separated by a colon (:).
White space is ignored by the format utility.
If you want an assigned value to contain white space, enclose the entire value
in double quotation marks ("). This syntax will cause the
white space within the quotes to be preserved as part of the assignment value.
Some assignments can have multiple values on the right hand
side. Separate values by a comma.
Keywords in the format.dat File
The format.dat file contains disk definitions that
are read by the format utility when it is started. Each
definition starts with one of the following keywords: disk_type
or partition. These keywords are described in the following
table.
Table 36-6 Keyword Descriptions for the format.dat File
Keyword | Use |
disk_type | Defines the controller and disk model.
Each disk_type definition contains information that concerns
the physical geometry of the disk. The default data file contains definitions
for the controllers and disks that the Solaris operating system 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 the format utility. The default format.dat 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 (format.dat)
The disk_type keyword in the format.dat file defines the controller and disk model. Each disk_type definition contains information about the physical geometry of
the disk. The default format.dat file contains definitions
for the controllers and disks that the Solaris operating system 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
the format utility is run. Enclose the name in double
quotation marks to preserve any white space in the name. The following table
describes the identifiers that must also be assigned values in all disk_type definitions.
Table 36-7 Required disk_type Identifiers
Identifier | Description |
ctlr | Identifies the controller type for
the disk type. Currently, the supported values are SCSI and ATA. |
ncyl | Specifies 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 | Specifies the number of alternate cylinders
in the disk type. These cylinders are used by the format
utility to store information such as the defect list for the drive. You should
always leave at least two cylinders for alternates. |
pcyl | Specifies 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 | Specifies the number of heads in the
disk type. This number is used to calculate the boundaries of the disk media. |
nsect | Specifies 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 number of data sections per track. |
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 identifiers might be necessary, depending on the controller. The
following table describes the identifiers that are required for SCSI controllers.
Table 36-8 disk_type Identifiers for SCSI Controllers
Identifier | Description |
fmt_time | A number that Indicates 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 on-board cache while the format utility is operating.
See the controller manual for more information. |
trks_zone | A number that specifies how many tracks
you have per defect zone, to be used in alternate sector mapping. See the
controller manual for more information. |
asect | A number that specifies how many sectors
are available for alternate mapping within a given defect zone. See the controller
manual for more information. |
The following are examples of disk_type definitions:
disk_type = "SUN1.3G" \
: ctlr = SCSI : fmt_time = 4 \
: trks_zone = 17 : asect = 6 : atrks = 17 \
: ncyl = 1965 : acyl = 2 : pcyl = 3500 : nhead = 17 : nsect = 80 \
: rpm = 5400 : bpt = 44823
disk_type = "SUN2.1G" \
: ctlr = SCSI : fmt_time = 4 \
: ncyl = 2733 : acyl = 2 : pcyl = 3500 : nhead = 19 : nsect = 80 \
: rpm = 5400 : bpt = 44823
disk_type = "SUN2.9G" \
: ctlr = SCSI : fmt_time = 4 \
: ncyl = 2734 : acyl = 2 : pcyl = 3500 : nhead = 21 : nsect = 99 \
: rpm = 5400
|
Partition or Slice Tables (format.dat)
A partition table in the format.dat file defines
a slice table for a specific disk type.
The partition keyword in the format.dat file is assigned the name of the slice table. Enclose the name
in double quotation marks to preserve any white space in the name. The following
table describes the identifiers that must be assigned values in all slice
tables.
Table 36-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 that this
slice table can be attached to. Currently, the supported values are ATA for
ATA controllers and SCSI for SCSI controllers. The controller type that is
specified here must also be defined for the disk_type that
you specified in the disk_type definition. |
The other identifiers in a slice definition describe the actual slice
information. The identifiers are the numbers 0 through 7. These identifiers
are optional. Any slice that is not explicitly assigned is set to 0 length.
The value of each of these identifiers 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. The following are some examples of
slice definitions:
partition = "SUN1.3G" \
: disk = "SUN1.3G" : ctlr = SCSI \
: 0 = 0, 34000 : 1 = 25, 133280 : 2 = 0, 2672400 : 6 = 123, 2505120
partition = "SUN2.1G" \
: disk = "SUN2.1G" : ctlr = SCSI \
: 0 = 0, 62320 : 1 = 41, 197600 : 2 = 0, 4154160 : 6 = 171, 3894240
partition = "SUN2.9G" \
: disk = "SUN2.9G" : ctlr = SCSI \
: 0 = 0, 195426 : 1 = 94, 390852 : 2 = 0, 5683986 : 6 = 282, 5097708
|
Specifying an Alternate Data File for the format
utility
The format utility learns of the location of an alternate
file by the following methods.
If a file name is given with the format -x option, that file is always used as the data file.
If the -x option is not specified, then the format utility looks in the current directory for a file named format.dat. If the file exists, it is used as the data file.
If neither of these methods yields a data file,
the format utility uses the /etc/format.dat
file as the data file. This file is shipped with the Solaris operating system and should
always be present.
|