如何恢复损坏的磁盘标签
将系统引导到单用户模式。
从本地 Oracle Solaris DVD 或网络引导,并访问磁盘。
启动 Format 实用程序。
# format
键入需要恢复的磁盘的编号。
Specify disk (enter its number):
如果此实用程序能够配置所选磁盘,则会显示以下消息:
disk: configured with capacity of size
选择以下内容之一以确定如何为磁盘设置标签。
如果磁盘已成功配置,请执行以下操作:
在 format > 提示符下,键入 verify。
验证过程包括搜索磁盘的备份标签。
确保检索到的备份标签的内容符合要求。
在 format > 提示符下,键入 backup 以应用标签。
出现提示时,确认运行该命令。
如果磁盘未成功配置,请执行以下操作:
在 Format 菜单的 format > 提示符下,键入 type。
将显示 "Available Drive Types" 菜单。
键入与磁盘类型对应的编号。
出现继续执行磁盘标签设置过程的提示时,键入 no。
在 format > 提示符下,键入 verify。
验证过程包括搜索磁盘的备份标签。
确保检索到的备份标签的内容符合要求。
在 format > 提示符下,键入 backup 以应用标签。
出现提示时,确认运行该命令。
恢复标签后,退出 Format 实用程序。
验证已恢复磁盘上的文件系统。
有关对 ZFS 文件系统使用 zpool scrub 命令的信息,请参见 zpool(1M) 手册页。
示例 6-18恢复自动配置的磁盘的标签
本示例假定您已选择要恢复其标签的磁盘。
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 =
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
检索到备份标签后,确保其内容满足要求,然后继续应用标签。
format> backup
Disk has a primary label, still continue? y
Searching for backup labels...found.
Restoring primary label
format> q
示例 6-19恢复不可自动配置的磁盘的标签
本示例假定您已选择要恢复其标签的磁盘。
format> type
Specify disk type (enter its number)[12]: 12
Disk not labeled. Label it now? no
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 =
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
检索到备份标签后,确保其内容满足要求,然后继续应用标签。
format> backup
Disk has a primary label, still continue? y
Searching for backup labels...found.
Restoring primary label
format> q