| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- disk partitioning and maintenance utility
format [-fcommand-file] [-llog-file] [-xdata-file] [-ddisk-name] [-tdisk-type] [-ppartition-name] [-s] [-m] [-M] [-e] [disk-list]
format-Llabel-type-ddisk-name
format enables you to format, label, repair, and analyze disks on yoursystem. Unlike previous disk maintenance programs,format runs under SunOS. Because thereare limitations to what can be done to the system disk whilethe system is running,format is also supported within the memory-resident systemenvironment. For most applications, however, runningformat under SunOS is the moreconvenient approach.
format first uses the disk list defined indata-file if the-xoption is used.format then checks for theFORMAT_PATH environment variable, acolon-separated list of filenames and/or directories. In the case of a directory,formatsearches for a file namedformat.dat in that directory; a filename shouldbe an absolute pathname, and is used without change.format adds alldisk and partition definitions in each specified file to the working set. Multipleidentical definitions are silently ignored. IfFORMAT_PATH is not set, the pathdefaults to/etc/format.dat.
disk-list is a list of disks in the formc?t?d?, or/dev/rdsk/c?t?d?s?,/dev/chassis/?/disk. With the last two forms, shell wildcard specifications are supported. Forexample, specifying/dev/rdsk/c2* causesformat to work on all drives connected tocontrollerc2 only. If nodisk-list is specified,format lists all thedisks present in the system that can be administered byformat.
Removable media devices are listed only when users executeformat in expertmode (option-e). This feature is provided for backward compatibility. Usermformat(1)for rewritable removable media devices.
The following options are supported:
Specify which disk should be made current upon entry into the program. The disk is specified by its logical name (for instance,-dc0t1d0 or/dev/chassis/SYS/HD0/disk). This can also be accomplished by specifying a single disk in the disk list.
Enable SCSI expert menu. Note this option is not recommended for casual use.
Take command input fromcommand-file rather than the standard input. The file must contain commands that appear just as they would if they had been entered from the keyboard. With this option,format does not issuecontinue? prompts; there is no need to specify y(es) or n(o) answers in thecommand-file. In non-interactive mode,format does not initially expect the input of a disk selection number. The user must specify the current working disk with the-ddisk-name option when format is invoked, or specifydisk and the disk selection number in thecommand-file.
Log a transcript of theformat session to the indicatedlog-file, including the standard input, the standard output and the standard error.
Immediately, and non-interactively, write a default label of typelabel-type, to the disk specified with-d.label-type must be eitherefi orvtoc. Existing label, if any, will be overwritten withlabel-type. On an x86 machine, the whole disk will default to one Solaris partition labeled withlabel-type; allfdisk partitions will be lost.
Enable extended messages. Provides more detailed information in the event of an error.
Enable extended and diagnostic messages. Provides extensive information on the state of a SCSI device's mode pages, during formatting.
Specify the partition table for the disk which is current upon entry into the program. The table is specified by its name as defined in the data file. This option can be used only if a disk is being made current, and its type is either specified or available from the disk label.
Silent. Suppress all of the standard output. Error messages are still displayed. This is generally used in conjunction with the-f option.
Specify the type of disk which is current upon entry into the program. A disk's type is specified by name in the data file. This option can only be used if a disk is being made current as described above.
Use the list of disks contained indata-file.
When you invoke format with no options or with the-e,-l,-m,-M, or-s options, the program displays a numbered list ofavailable disks and prompts you to specify a disk by list number.If the machine has more than a screenful of disks, press SPACE tosee the next screenful of disks.
You can specify a disk by list number even if the diskis not displayed in the current screenful. For example, if the currentscreen shows disks 11-20, you can enter25 to specify the twenty-fifthdisk on the list. If you enter a number for a diskthat is not currently displayed,format prompts you to verify your selection. Ifyou enter a number from the displayed list,format silently accepts yourselection.
After you specify a disk,format displays its main menu. This menuenables you to perform the following tasks:
Run read, write, compare tests, and data purge. The data purge function implements the National Computer Security Center Guide to Understanding Data Remnance (NCSC-TG-025 version 2) Overwriting Algorithm. See NOTES.
Search for backup labels.
Enable, disable, and query the state of the write cache and read cache. This menu item only appears whenformat is invoked with the-e option, and is only supported on SCSI devices..
Display the device name, the disk geometry, and the pathname to the disk device.
Retrieve and print defect lists. This option is supported only on SCSI devices. IDE disks perform automatic defect management. Upon using thedefect option on an IDE disk, you receive the message:
Controller does not support defect managementor disk supports automatic defect management.
Choose the disk that will be used in subsequent operations (known as the current disk.)
Run thefdisk(1M) program to create afdisk partition for Solaris software (x86 based systems only).
Format and verify the current disk. This option is supported only on SCSI devices. IDE disks are pre-formatted by the manufacturer. Upon using theformat option on an IDE disk, you receive the message:
Cannot format this drive. Please use your manufacturer-supplied formatting utility.
Display the vendor, product name, and revision level of the current drive.
Write a new label to the current disk.
Create and modify slices.
Exit the format menu.
Repair a specific block on the disk.
Save new disk and slice information.
Select (define) a disk type.
Read and display labels. Print information such as the number of cylinders, alternate cylinders, heads, sectors, and the partition table.
Label the disk with a new eight character volume name.
a colon-separated list of filenames and/or directories of disk and partition definitions. If a directory is specified,format searches for the fileformat.dat in that directory.
default data file
Seeattributes(5) for descriptions of the following attributes:
|
fmthard(1M),prtvtoc(1M),rmformat(1),format.dat(4),attributes(5),sd(7D)
Oracle Solaris Administration: Common Tasks
When theformat function is selected to format the Maxtor 207MB disk,the following message displays:
Mode sense page(4) reports rpm value as 0, adjusting it to 3600
This is a drive bug that may also occur with older thirdparty drives. The above message is not an error; the drive willstill function correctly.
Cylinder 0 contains the partition table (disk label), which can be overwrittenif used in a raw disk partition by third party software.
format supports writing EFI-compliant disk labels in order to support disks orLUNs with capacities greater than one terabyte. However, care should be exercisedsince many software components, such as filesystems and volume managers, are still restrictedto capacities of one terabyte or less. See theOracle Solaris Administration: Common Tasks for additionalinformation.
By default, on an unlabeled disk, EFI labels will be written ondisks larger than 2 TB. Whenformat is invoked with the-eoption, on writing the label, the label type can be chosen. Bootingis not currently supported on a disk with an EFI label.
format provides a help facility you can use whenever format is expectinginput. You can request help about what information is expected by simplyentering a question mark (?) andformat prints a brief description ofwhat type of input is needed. If you enter a? at themenu prompt, a list of available commands is displayed.
For SCSI disks, formatting is done with both Primary and Grown defectslist by default. However, if only Primary list is extracted in defectmenu before formatting, formatting will be done with Primary list only.
Changing the state of the caches is only supported on SCSI devices,and not all SCSI devices support changing or saving the state ofthe caches.
The NCSC-TG-025 algorithm for overwriting meets the DoD 5200.28-M (ADP Security Manual)Eraser Procedures specification. The NIST Guidelines for Media Sanitization (NIST SP 800-88) alsoreference this algorithm.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |