系统管理指南:设备和文件系统

Procedure如何格式化磁盘

  1. 成为超级用户或承担等效角色。

  2. 调用 format 实用程序。


    # format
    

    将显示可用磁盘的编号列表。

  3. 键入要格式化的磁盘的编号。


    Specify disk (enter its number): 0
    

    注意 – 注意 –

    请勿选择系统磁盘。如果格式化系统磁盘,则会删除此磁盘上的 OS 和任何数据。


  4. 要开始格式化磁盘,请在 format> 提示符下键入 format。通过键入 y 确认该命令。


    format> format
    
    Ready to format.  Formatting cannot be interrupted
    
    and takes 23 minutes (estimated). Continue? yes
    
  5. 通过查看以下消息,验证磁盘格式化是否已成功:


    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. 退出 format 实用程序。


    format> quit
    

示例 12–3 格式化磁盘

以下示例说明如何格式化磁盘 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 Wed Jan  7 16:16:05 2004



Formatting...

   99% complete (00:00:21 remaining) done



Verifying media...

        pass 0 - pattern = 0xc6dec6de

   71132922  



        pass 1 - pattern = 0x6db6db6d

   71132922  



Total of 0 defective blocks repaired.

format> quit