JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 8/11 Information Library
search filter icon
search icon

Document Information

About This Book

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)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

Administering Disks (Task Map)

Identifying Disks on a System

How to Identify the Disks on a System

Formatting a Disk

How to Determine if a Disk Is Formatted

How to Format a Disk

Displaying Disk Slices

How to Display Disk Slice Information

Creating and Examining a Disk Label

How to Label a Disk

How to Examine a Disk Label

Recovering a Corrupted Disk Label

How to Recover a Corrupted Disk Label

Adding a Third-Party Disk

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

Index

Recovering a Corrupted Disk Label

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.

How to Recover a Corrupted Disk Label

  1. Boot the system to single-user mode.

    If necessary, boot the system from a local Oracle 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.

  2. Relabel the disk.
    # 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.

  3. Type the number of the disk that you need to recover.
    Specify disk (enter its number): 1
  4. Select one of the following to determine how to label the disk.
    • 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.

  5. Search for the backup label.
    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
  6. If the format utility was able to find a backup label and the backup label contents appear satisfactory, use the backup command to label the disk with the backup label.
    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.

  7. If the format utility was not able to automatically configure the disk, specify the disk type by using the type command.
    format> type

    The Available Drives Type menu is displayed.

  8. Select 0 to automatically configure the disk. Or, select a disk type from the list of possible disk types.
    Specify disk type (enter its number)[12]: 12
  9. If the disk was successfully configured, reply with no when the format utility asks if you want to label the disk.
    Disk not labeled.  Label it now?  no
  10. Use the verify command to search for backup labels.
    format> verify
    Warning: Could not read primary label.
    Warning: Check the current partitioning and 'label' the disk
    or use the 'backup' command.
    .
    .
    .
  11. If the format utility was able to find a backup label and the backup label contents appear satisfactory, use the backup command to label the disk with the backup label.
    format> backup
    Disk has a primary label, still continue? y
    Searching for backup labels...found.
    Restoring primary label

    The disk label has been recovered.

  12. Exit the format utility.
    format> q
  13. Verify the file systems on the recovered disk by using the fsck command.

    For information on using the fsck command, see Chapter 20, Checking UFS File System Consistency (Tasks).