JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

Administering Disks (Task Map)

Identifying Disks on a System

How to Identify the Disks on a System

Formatting a Disk

How to Determine if a Disk Is Formatted

How to Format a Disk

Displaying Disk Slices

How to Display Disk Slice Information

Creating and Examining a Disk Label

How to Label a Disk

How to Examine a Disk Label

Recovering a Corrupted Disk Label

How to Recover a Corrupted Disk Label

Adding a Third-Party Disk

Creating a format.dat Entry

How to Create a format.dat Entry

Automatically Configuring SCSI Disk Drives

How to Automatically Configure a SCSI Drive

Repairing a Defective Sector

How to Identify a Defective Sector by Using Surface Analysis

How to Repair a Defective Sector

Tips and Tricks for Managing Disks

Debugging format Sessions

Labeling Multiple Disks by Using the prtvtoc and fmthard Commands

12.  SPARC: Adding a Disk (Tasks)

13.  x86: Adding a Disk (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)

18.  Mounting and Unmounting File Systems (Tasks)

19.  Using The CacheFS File System (Tasks)

20.  Configuring Additional Swap Space (Tasks)

21.  Checking UFS File System Consistency (Tasks)

22.  UFS File System (Reference)

23.  Backing Up and Restoring UFS File Systems (Overview)

24.  Backing Up UFS Files and File Systems (Tasks)

25.  Using UFS Snapshots (Tasks)

26.  Restoring UFS Files and File Systems (Tasks)

27.  UFS Backup and Restore Commands (Reference)

28.  Copying UFS Files and File Systems (Tasks)

29.  Managing Tape Drives (Tasks)

Index

Formatting a Disk

Disks are typically formatted by the manufacturer or reseller. They usually do not need to be reformatted when you install the drive.

A disk must be formatted before you can do the following:


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.


How to Determine if a Disk Is Formatted

  1. Become superuser or assume an equivalent role.
  2. Invoke the format utility.
    # format

    A numbered list of disks is displayed.

  3. Type the number of the disk that you want to check.
    Specify disk (enter its number): 0
  4. Verify that the disk you chose is formatted by noting the following message:
    [disk formatted]

Example 11-2 Determining if a Disk Is Formatted

The following example shows that disk c1t0d0 is formatted.

# format /dev/rdsk/c1*
AVAILABLE DISK SELECTIONS:
       0. /dev/rdsk/c1t0d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@0,0
       1. /dev/rdsk/c1t1d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@1,0
       2. /dev/rdsk/c1t8d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@8,0
       3. /dev/rdsk/c1t9d0s0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
          /sbus@2,0/QLGC,isp@2,10000/sd@9,0
Specify disk (enter its number): 0
selecting /dev/rdsk/c1t0d0s0
[disk formatted]

How to Format a Disk

  1. Become superuser or assume an equivalent role.
  2. Invoke the format utility.
    # format

    A numbered list of disks is displayed.

  3. Type the number of the disk that you want to format.
    Specify disk (enter its number): 0

    Caution

    Caution - Do not select the system disk. If you format your system disk, you delete the OS and any data on this disk.


  4. To begin formatting the disk, type format at the format> prompt. Confirm the command by typing y.
    format> format
    Ready to format.  Formatting cannot be interrupted
    and takes 23 minutes (estimated). Continue? yes
  5. Verify that the disk format was successful by noting the following messages:
    Beginning format. The current time Tue ABC xx xx:xx:xx xxxx
    
    Formatting...
    done
    
    Verifying media...
            pass 0 - pattern = 0xc6dec6de
       2035/12/18  
    
            pass 1 - pattern = 0x6db6db6d
       2035/12/18  
    
    Total of 0 defective blocks repaired.
  6. Exit the format utility.
    format> quit

Example 11-3 Formatting a Disk

The following example shows how to format the disk c0t6d0.

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <SUNW18G cyl 7506 alt 2 hd 19 sec 248
          /pci@1f,0/pci@1,1/scsi@2/sd@0,0
       1. c0t1d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@1,0
       2. c0t2d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@2,0
       3. c0t3d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@3,0
       4. c0t4d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@4,0
       5. c0t5d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@5,0
       6. c0t6d0 <FUJITSU  MAN3367M SUN36G  1804 43d671f>
          /pci@1f,0/pci@1,1/scsi@2/sd@6,0
Specify disk (enter its number): 6
selecting c0t6d0
[disk formatted]
format> format
Ready to format.  Formatting cannot be interrupted
and takes 332 minutes (estimated). Continue? y
Beginning format. The current time is Mon Jul 12 10:52:10 2010
Formatting...
Verifying media...
Total of 0 defective blocks repaired.
format> quit