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

文档信息

前言

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

2.  写入 CD 和 DVD(任务)

3.  管理设备(任务)

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

5.  管理 USB 设备(任务)

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

7.  管理磁盘(概述)

8.  管理磁盘使用(任务)

9.  管理磁盘(任务)

管理磁盘(任务列表)

确定系统中的磁盘

如何确定系统中的磁盘

格式化磁盘

如何确定磁盘是否已格式化

如何格式化磁盘

显示磁盘分片

如何显示磁盘分片信息

创建和检查磁盘标签

如何为磁盘设置标签

如何检查磁盘标签

恢复损坏的磁盘标签

如何恢复损坏的磁盘标签

添加第三方磁盘

10.  设置磁盘(任务)

11.  使用 COMSTAR 配置存储设备(任务)

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

13.  format 实用程序(参考信息)

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

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

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

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

18.  管理磁带机(任务)

索引

恢复损坏的磁盘标签

有时,电源或系统故障会导致磁盘标签变得无法识别。损坏的磁盘标签并不总是意味着,必须重新创建或恢复分片信息或磁盘数据。

要恢复损坏的磁盘标签,首先应使用正确的几何参数和磁盘类型信息为磁盘设置标签。可以通过常规的磁盘设置标签方法完成该步骤,即使用自动配置或手动指定磁盘类型。

如果 format 实用程序识别该磁盘类型,则下一步是搜索备份标签以为磁盘设置标签。使用备份标签为磁盘设置标签时,会以正确的分区信息、磁盘类型和磁盘几何参数为磁盘设置标签。

如何恢复损坏的磁盘标签

  1. 将系统引导到单用户模式。

    如有必要,请在单用户模式下从本地 Oracle Solaris DVD 或网络引导系统以访问磁盘。

    有关引导系统的信息,请参见《引导和关闭 Oracle Solaris 11.1 系统》

  2. 重新为磁盘设置标签。
    # format

    format 实用程序会尝试自动配置任何不带标签的 SCSI 磁盘。如果 format 实用程序能够配置不带标签的已损坏磁盘,则它将显示以下消息:

    cwtxdy: configured with capacity of abcMB

    format 实用程序然后显示系统中磁盘的编号列表。

  3. 键入需要恢复的磁盘的编号。
    Specify disk (enter its number): 1
  4. 选择以下内容之一以确定如何为磁盘设置标签。
    • 如果磁盘已成功配置,请执行以下操作:
      1. 搜索备份标签。
        format> verify
        Warning: Could not read primary label.
        Warning: Check the current partitioning and 'label' the disk or 
        use the 'backup' command.
        Backup label contents:
        Volume name = <        >
        ascii name  = <FUJITSU-MAP3147N SUN146G-0501>
        pcyl        = 14089
        ncyl        = 14087
        acyl        =    2
        nhead       =   24
        nsect       =  848
        Part      Tag    Flag     Cylinders         Size            Blocks
          0       root    wm       0 - 14086      136.71GB    (14087/0/0) 286698624
          1       swap    wu       0                0         (0/0/0)             0
          2     backup    wu       0 - 14086      136.71GB    (14087/0/0) 286698624
          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       0                0         (0/0/0)             0
          7 unassigned    wm       0                0         (0/0/0)             0
      2. 如果 format 实用程序可以找到备份标签,并且备份标签的内容符合要求,请使用备份标签为磁盘设置标签。
        format> backup
        Disk has a primary label, still continue? y
         
        Searching for backup labels...found.
        Restoring primary label

        磁盘标签已恢复

      3. 退出format实用程序。
        format> q
    • 如果磁盘成功配置,请执行以下操作:
      1. 使用 type 命令指定磁盘类型:
        format> type

        将显示 "Available Drive Types"(可用的驱动器类型)菜单。

      2. 选择 0 以自动配置磁盘。或者,从可能的磁盘类型列表中选择一种磁盘类型。
        Specify disk type (enter its number)[12]: 12
      3. 如果成功配置磁盘,则在 format 实用程序询问您是否要为磁盘设置标签时应答 no
        Disk not labeled.  Label it now?  no
      4. 搜索备份标签。
        format> verify
        Warning: Could not read primary label.
        Warning: Check the current partitioning and 'label' the disk
        or use the 'backup' command.
        .
        .
        .
      5. 如果 format 实用程序可以找到备份标签,并且备份标签的内容符合要求,请使用备份标签为磁盘设置标签。
        format> backup
        Disk has a primary label, still continue? y
        Searching for backup labels...found.
        Restoring primary label

        磁盘标签已恢复。

      6. 退出 format 实用程序。
        format> q
  5. 验证已恢复磁盘上的文件系统。

    有关将 zpool scrub 命令用于 ZFS 文件系统的信息,请参见 zpool(1M)