1. Managing Removable Media (Overview)
2. Managing Removable Media (Tasks)
3. Accessing Removable Media (Tasks)
4. Writing CDs and DVDs (Tasks)
5. Managing Devices (Overview/Tasks)
6. Dynamically Configuring Devices (Tasks)
7. Using USB Devices (Overview)
9. Using InfiniBand Devices (Overview/Tasks)
11. Administering Disks (Tasks)
Administering Disks (Task Map)
How to Identify the Disks on a System
How to Determine if a Disk Is Formatted
How to Display Disk Slice Information
Creating and Examining a Disk Label
How to Create a format.dat Entry
Automatically Configuring SCSI Disk Drives
How to Automatically Configure a SCSI Drive
How to Identify a Defective Sector by Using Surface Analysis
How to Repair a Defective Sector
Tips and Tricks for Managing Disks
Labeling Multiple Disks by Using the prtvtoc and fmthard Commands
12. SPARC: Adding a Disk (Tasks)
13. x86: Adding a Disk (Tasks)
14. Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)
15. The format Utility (Reference)
16. Managing File Systems (Overview)
17. Creating ZFS, UFS, TMPFS, and LOFS File Systems (Tasks)
18. Mounting and Unmounting File Systems (Tasks)
19. Using The CacheFS File System (Tasks)
20. Configuring Additional Swap Space (Tasks)
21. Checking UFS File System Consistency (Tasks)
22. UFS File System (Reference)
23. Backing Up and Restoring UFS File Systems (Overview)
24. Backing Up UFS Files and File Systems (Tasks)
25. Using UFS Snapshots (Tasks)
26. Restoring UFS Files and File Systems (Tasks)
27. UFS Backup and Restore Commands (Reference)
28. Copying UFS Files and File Systems (Tasks)
Sometimes, a power or system failure causes a disk's label to become unrecognizable. A corrupted disk label doesn't always mean that the slice information or the disk's data must be re-created or restored.
The first step to recovering a corrupted disk label is to label the disk with the correct geometry and disk type information. You can complete this step through the normal disk labeling method, by using either automatic configuration or manual disk type specification.
If the format utility recognizes the disk type, the next step is to search for a backup label to label the disk. Labeling the disk with the backup label labels the disk with the correct partitioning information, the disk type, and disk geometry.
If necessary, boot the system from a local Solaris DVD or the network in single-user mode to access the disk.
See Chapter 12, Booting an Oracle Solaris System (Tasks), in System Administration Guide: Basic Administration or Booting an x86 Based System by Using GRUB (Task Map) in System Administration Guide: Basic Administration for information on booting the system.
# format
The format utility attempts to automatically configure any unlabeled SCSI disk. If the format utility is able to configure the unlabeled and corrupted disk, it will display this message:
cwtxdy: configured with capacity of abcMB
The format utility then displays a numbered list of disks on the system.
Specify disk (enter its number): 1
If the disk was configured successfully, follow Steps 5 and 6. Then go to step 12.
If the disk was not configured successfully, follow Steps 7–11. Then go to step 12.
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 = <SUN1.05 cyl 2036 alt 2 hd 14 sec 72> pcyl = 2038 ncyl = 2036 acyl = 2 nhead = 14 nsect = 72 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
format> backup Disk has a primary label, still continue? y Searching for backup labels...found. Restoring primary label
The disk label has been recovered. Go to Step 12.
format> type
The Available Drives Type menu is displayed.
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. . . .
format> backup Disk has a primary label, still continue? y Searching for backup labels...found. Restoring primary label
The disk label has been recovered.
format> q
For information on using the fsck command, see Chapter 21, Checking UFS File System Consistency (Tasks).