System Administration Guide: Basic Administration

The format Utility

Read the following overview of the format utility and its uses before proceeding to the “how-to” or reference sections.

The format utility is a system administration tool that is used to prepare hard disk drives for use on your Solaris system.

The following table shows the features and associated benefits that the format utility provides.

Table 31–5 Features and Benefits of the format Utility

Feature 

Benefit 

Searches your system for all attached disk drives 

Reports on the following:

  • Target location

  • Disk geometry

  • Whether the disk is formatted

  • If the disk has mounted partitions

Retrieves disk labels 

Convenient for repair operations 

Repairs defective sectors 

Allows administrators to repair disk drives with recoverable errors instead of sending the drive back to the manufacturer 

Formats and analyzes a disk 

Creates sectors on the disk and verifies each sector 

Partitions a disk 

Divides a disk into slices so individual file systems can be created on separate slices 

Labels a disk 

Writes disk name and configuration information to the disk for future retrieval (usually for repair operations) 

The format utility options are fully described in Chapter 35, The format Utility (Reference).

When to Use the format Utility

Disk drives are partitioned and labeled by the Solaris installation program when you install the Solaris release. You can use the format utility to do the following:

The main reason a system administrator uses the format utility is to divide a disk into disk slices. These steps are covered in Chapter 33, SPARC: Adding a Disk (Tasks) and Chapter 34, x86: Adding a Disk (Tasks).

See the following section for guidelines on using the format utility.

Guidelines for Using the format Utility

Table 31–6 The format Utility Guidelines

Task 

Guidelines 

For More Information 

Format a disk 

  • Any existing data is destroyed when you reformat a disk.

  • The need for formatting a disk drive has dropped as more and more manufacturers ship their disk drives formatted and partitioned. You might not need to use the format utility when you add a disk drive to an existing system.

  • If a disk has been relocated and is displaying a lot of disk errors, you can attempt to reformat it, which will automatically remap any bad sectors.

How to Format a Disk

Replace a system disk 

  • Data from the damaged system disk must be restored from a backup medium. Otherwise, the system will have to be reinstalled by using the installation program.

SPARC: How to Connect a System Disk and Boot or IA: How to Connect a System Disk and Boot or if the system must be reinstalled, Solaris 9 Installation Guide

Divide a disk into slices 

  • Any existing data is destroyed when you repartition and relabel a disk with existing slices.

  • Existing data must be copied to backup media before the disk is repartitioned and restored.

SPARC: How to Create Disk Slices and Label a Disk or IA: How to Create Disk Slices and Label a Disk

Add a secondary disk to an existing system 

  • Any existing data must be restored from backup media if the secondary disk is reformatted or repartitioned.

SPARC: How to Connect a Secondary Disk and Boot or IA: How to Connect a Secondary Disk and Boot

Repair a disk drive 

  • Some customer sites prefer to replace rather than repair defective drives. If your site has a repair contract with the disk drive manufacturer, you might not need to use the format utility to repair disk drives.

  • The repair of a disk drive usually means that a bad sector is added to a defect list. New controllers remap bad sectors automatically with no system interruption.

  • If the system has an older controller, you might need to remap a bad sector and restore any lost data.

Repairing a Defective Sector

Formatting a Disk

In most cases, disks are formatted by the manufacturer or reseller. So, they do not need to be reformatted when you install the drive. To determine if a disk is formatted, use the format utility. For more information, see How to Determine if a Disk is Formatted.

If you determine that a disk is not formatted, use the format utility to format the disk.

When you format a disk, you accomplishes two steps:


Caution – Caution –

Formatting a disk is a destructive process because it overwrites data on the disk. For this reason, disks are usually formatted only by the manufacturer or reseller. If you think disk defects are the cause of recurring problems, you can use the format utility to do a surface analysis. However, be careful to use only the commands that do not destroy data. For details, see How to Format a Disk.


A small percentage of total disk space that is available for data is used to store defect and formatting information. This percentage varies according to disk geometry, and decreases as the disk ages and develops more defects.

Formatting a disk might take anywhere from a few minutes to several hours, depending on the type and size of the disk.