Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
32.  Administering Disks (Tasks) Formatting a Disk How to Determine if a Disk is Formatted  Previous   Contents   Next 
   
 

Example--Determining if a Disk Is Formatted

The following example shows that disk c0t3d0 is formatted.

# format
AVAILABLE DISK SELECTIONS:
  0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72> 
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
  1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number): 0
selecting c0t1d0
[disk formatted]

How to Format a Disk

  1. Become superuser or assume an equivalent role.

  2. Invoke the format utility.

    # format
  3. Type the number of the disk that you want to format from the list displayed on your screen.

    Specify disk (enter its number): 0

    Caution - Do not select the system disk. If you format your system disk, you delete the operating system 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 is 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.

Example--Formatting a Disk

The following example shows how to format the disk c0t3d0.

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
  0. c0t1d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@1,0
  1. c0t3d0 <SUN1.05 cyl 2036 alt 2 hd 14 sec 72>
     /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@3,0
Specify disk (enter its number):1
Selecting c0t3d0
[disk formatted]
format> format
Ready to format. Formatting cannot be interrupted
and takes 23 minutes (estimated). Continue? yes
Beginning format. The current time is Thu Dec  6 09:54:40 2001
Formatting ...
done
Verifying media...
        pass 0 - pattern = 0xc6dec6de
   2035/12/18  

        pass 1 - pattern = 0x6db6db6d
   2035/12/18  

Total of 0 defective blocks repaired.
format>

Displaying Disk Slices

You can use the format utility to check whether a disk has the appropriate disk slices. If you determine that a disk does not contain the slices you want to use, use the format utility to re-create them and label the disk. For information on creating disk slices, see "SPARC: How to Create Disk Slices and Label a Disk" or "IA: How to Create Disk Slices and Label a Disk".


Note - The format utility uses the term partition instead of slice.


How to Display Disk Slice Information

  1. Become superuser or assume an equivalent role.

  2. Invoke the format utility.

    # format
  3. Type the number of the disk for which you want to display slice information from the list displayed on your screen.

    Specify disk (enter its number):1
  4. Select the partition menu.

    format> partition 
  5. Display the slice information for the current disk drive.

    partition> print
  6. Exit the format utility.

    partition> q
    format> q
    #
  7. Verify the displayed slice information by identifying specific slice tags and slices.

    If the screen output shows that no slice sizes are assigned, the disk probably does not have slices.

Examples--Displaying Disk Slice Information

The following example displays slice information for disk /dev/dsk/c0t3d0.

# format
Searching for disks...done
Specify disk (enter its number):1
Selecting c0t3d0
format> partition
partition> print
Current partition table (original):
Total disk cylinders available: 2036 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -  300      148.15MB    (301/0/0)   303408
  1       swap    wu     301 -  524      110.25MB    (224/0/0)   225792
  2     backup    wm       0 - 2035     1002.09MB    (2036/0/0) 2052288
  3 unassigned    wm       0               0         (0/0/0)          0
  4 unassigned    wm       0               0         (0/0/0)          0
  5 unassigned    wm       0               0         (0/0/0)          0
  6        usr    wm     525 - 2035      743.70MB    (1511/0/0) 1523088
  7 unassigned    wm       0               0         (0/0/0)          0
partition> q
format> q
#

For a detailed description of the slice information in these examples, see Chapter 31, Managing Disks (Overview).

The following example shows the slice information on disk /dev/dsk/c0t0d0.

# format
Searching for disks...done
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted]
format> partition
partition> print
Current partition table (original):
Total disk cylinders available: 817 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       3 - 816        6.26GB    (814/0/0) 13128192
  1 unassigned    wm       0              0         (0/0/0)          0
  2     backup    wm       0 - 816        6.28GB    (817/0/0) 13176576
  3 unassigned    wm       0              0         (0/0/0)          0
  4 unassigned    wm       0              0         (0/0/0)          0
  5 unassigned    wm       0              0         (0/0/0)          0
  6 unassigned    wm       0              0         (0/0/0)          0
  7 unassigned    wm       0              0         (0/0/0)          0
  8       boot    wu       0 -   0        7.88MB    (1/0/0)      16128
  9 alternates    wu       1 -   2       15.75MB    (2/0/0)      32256
partition> q
format> q
 
 
 
  Previous   Contents   Next