JavaScript is required to for searching.
跳过导航链接
退出打印视图
Oracle Solaris 管理:设备和文件系统     Oracle Solaris 11 Information Library (简体中文)
search filter icon
search icon

文档信息

关于本书

1.  管理可移除介质(概述)

2.  管理可移除介质(任务)

3.  访问可移除介质(任务)

4.  写入 CD 和 DVD(任务)

5.  管理设备(概述/任务)

6.  动态配置设备(任务)

7.  使用 USB 设备(概述)

8.  使用 USB 设备(任务)

9.  使用 InfiniBand 设备(概述/任务)

10.  管理磁盘(概述)

11.  管理磁盘(任务)

12.  SPARC:设置磁盘(任务)

13.  x86:设置磁盘(任务)

14.  使用 COMSTAR 配置存储设备

15.  配置和管理 Oracle Solaris Internet 存储名称服务 (Internet Storage Name Service, iSNS)

16.  format 实用程序(参考)

有关使用 format 实用程序的建议和要求

format 菜单和命令说明

partition 菜单

x86: fdisk 菜单

analyze 菜单

defect 菜单

format 命令的输入规则

为 format 命令指定数字

指定 format 命令名称

为 format 命令指定磁盘名称

获取有关 format 实用程序的帮助

17.  管理文件系统(概述)

18.  创建和挂载文件系统(任务)

19.  配置附加交换空间(任务)

20.  复制文件和文件系统(任务)

21.  管理磁带机(任务)

索引

format 菜单和命令说明

format 主菜单的显示与以下内容类似:

FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program (x86 only)
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit
format> 

下表描述了 format 实用程序的主菜单项。

表 16-1 format 实用程序的主菜单项说明

菜单项
命令或菜单?
说明
disk
命令
列出系统的所有驱动器。此外,还可用于选择要在后续操作中使用的磁盘。该磁盘称为当前磁盘。
type
命令
标识当前磁盘的制造商和型号。另外,还可显示已知驱动器类型列表。可用于为所有 SCSI-2 磁盘驱动器选择 Auto configure 选项。
partition
菜单
创建和修改分片。有关更多信息,请参见 partition 菜单。
current
命令
显示以下有关当前磁盘的信息:
  • 设备名称和设备类型

  • 柱面、备用柱面、磁头和扇区的数目

  • 物理设备名称

format
命令
按照一定顺序使用以下信息源之一格式化当前磁盘:
  1. 在 format.dat 文件中找到的信息

  2. 来自自动配置过程的信息

  3. 不存在 format.dat 项时在提示符下键入的信息

此命令不适用于 IDE 磁盘。IDE 磁盘由制造商进行预先格式化。

fdisk
菜单
仅限于 x86 平台:运行 fdisk 程序可创建 Solaris fdisk 分区。

在容量超过 1 TB 且带有 EFI 标签的磁盘上,不能使用 fdisk 命令。

repair
命令
修复当前磁盘上的特定块。
label
命令
将新标签写入当前磁盘。
analyze
菜单
运行读取、写入和比较测试。有关更多信息,请参见 analyze 菜单。
defect
菜单
检索并显示缺陷列表。有关更多信息,请参见 defect 菜单。此功能不适用于 IDE 磁盘。IDE 磁盘会自动管理缺陷。
backup
命令
VTOC-搜索备份标签。

EFI-不支持。

verify
命令
显示以下有关当前磁盘的信息:
  • 设备名称和设备类型

  • 柱面、备用柱面、磁头和扇区的数目

  • 分区表

save
命令
VTOC-保存新的磁盘和分区信息。

EFI-不适用。

inquiry
命令
仅限于 SCSI-显示当前磁盘的供应商、产品名称和修订版级别。
volname
命令
使用指定的由八个字符组成的新卷名为磁盘设置标签。
quit
命令
退出 format 菜单。

partition 菜单

partition 菜单的显示与以下内容类似:

format> partition
PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        quit
partition> 

下表描述了 partition 菜单项。

表 16-2 partition 菜单项的说明

子命令
说明
change `n' partition
用于指定新分区的以下信息:
  • 标识标记

  • 权限标志

  • 起始柱面

  • 大小

select
用于选择预定义的分区表。
modify
用于更改分区表中的所有分片。此命令优先于各个 change `x' partition 命令。
name
用于为当前分区表指定名称。
print
显示当前分区表。
label
将分区映射和标签写入当前磁盘。
quit
退出 partition 菜单。

x86: fdisk 菜单

fdisk 菜单仅出现在基于 x86 的系统上,其显示与以下内容类似。

format> fdisk
             Total disk size is 14169 cylinders
             Cylinder size is 2510 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1       Active    x86 Boot          1     9       9      0
          2                 Solaris2         10  14168    14159    100

SELECT ONE OF THE FOLLOWING:

  1. Create a partition
  2. Specify the active partition
  3. Delete a partition
  4. Change between Solaris and Solaris2 Partition IDs
  5. Exit (update disk configuration and exit)
  6. Cancel (exit without updating disk configuration)
  Enter Selection:

下表描述了 fdisk 菜单项。

表 16-3 x86: fdisk 菜单项的说明

菜单项
说明
Create a partition
创建 fdisk 分区。必须为每个 OS(如 Oracle Solaris 或 DOS)创建单独的分区。每个磁盘最多包含四个分区。系统会提示以磁盘百分比形式输入 fdisk 分区的大小。
Specify the active partition
用于指定要用于引导的分区。此菜单项可标识第一阶段引导程序查找第二阶段引导程序的位置。
Delete a partition
删除以前创建的分区。此命令将破坏分区中的所有数据。
Change between Solaris and Solaris2 Partition IDs
将分区 ID 从 130 (0x82) 更改为 191 (0xbf) 并执行相反操作。
Exit (update disk configuration and exit)
写入新版本的分区表并退出 fdisk 菜单。
Cancel (exit without updating disk configuration)
退出 fdisk 菜单,而不修改分区表。

analyze 菜单

analyze 菜单的显示与以下内容类似。

format> analyze
 
ANALYZE MENU:
    read     - read only test   (doesn't harm SunOS)
    refresh  - read then write  (doesn't harm data)
    test     - pattern testing  (doesn't harm data)
    write    - write then read      (corrupts data)
    compare  - write, read, compare (corrupts data)
    purge    - write, read, write   (corrupts data)
    verify   - write entire disk, then verify (corrupts data)
    print    - display data buffer
    setup    - set analysis parameters
    config   - show analysis parameters
    quit
analyze> 

下表描述了 analyze 菜单项。

表 16-4 analyze 菜单项的说明

子命令
说明
read
读取当前磁盘上的每个扇区。缺省情况下会修复有缺陷的块。
refresh
读取当前磁盘上的数据然后再将数据写入磁盘,而不损害数据。缺省情况下会修复有缺陷的块。
test
将一组模式写入磁盘,而不损害数据。缺省情况下会修复有缺陷的块。
write
将一组模式写入磁盘,然后读回磁盘上的数据。破坏磁盘上的现有数据。缺省情况下会修复有缺陷的块。
compare
将一组模式写入磁盘,读回数据,然后将其与写缓冲区中的数据进行比较。破坏磁盘上的现有数据。缺省情况下会修复有缺陷的块。
purge
从磁盘中删除所有数据,以便不能通过任何方式检索数据。通过在整个磁盘(或磁盘的一部分)范围写入三种不同的模式来删除数据。如果验证通过,则将在整个磁盘(或磁盘的一部分)范围内写入十六进制位模式。

缺省情况下会修复有缺陷的块。

verify
第一遍将特殊数据写入整个磁盘上的每个块。第二遍读取并验证这些数据。破坏磁盘上的现有数据。缺省情况下会修复有缺陷的块。
print
显示读/写缓冲区中的数据。
setup
用于指定以下分析参数:
Analyze entire disk? yes
Starting block number: depends on drive
Ending block number: depends on drive
Loop continuously? no
Number of passes: 2
    Repair defective blocks? yes
Stop after first error? no
Use random bit patterns? no
Number of blocks per transfer: 126 (0/n/nn)
Verify media after formatting? yes
Enable extended messages? no
Restore defect list? yes
Restore disk label? yes
config
显示当前分析参数。
quit
退出 analyze 菜单。

defect 菜单

defect 菜单的显示与以下内容类似:

format> defect
 
DEFECT MENU:
        primary  - extract manufacturer's defect list
        grown    - extract manufacturer's and repaired defects lists
        both     - extract both primary and grown defects lists
        print    - display working list
        dump     - dump working list to file
        quit
defect> 

下表描述了 defect 菜单项。

表 16-5 defect 菜单项说明

子命令
说明
primary(主)
从磁盘驱动器读取制造商的缺陷列表并更新内存中的缺陷列表。
grown
读取产生的缺陷列表,然后更新内存中的缺陷列表。产生的缺陷是指在分析过程中检测到的缺陷。
both
读取制造商的缺陷列表和产生的缺陷列表。然后更新内存中的缺陷列表。
print
显示内存中的缺陷列表。
dump
将内存中的缺陷列表保存到文件中。
quit
退出 defect 菜单。