Go to main content

Managing Devices in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Recovering a Corrupted Disk Label

A power or system failure might cause 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. However, the label must be restored.

Recovering a corrupted disk label requires two general steps: specifying the correct type for the disk and then recovering the backup label. Both steps are part of the Format utility.

How to Recover a Corrupted Disk Label

  1. Boot the system to single-user mode.

    Use either a local Oracle Solaris DVD or the network to boot and access the disk.

    For information on booting the system, see Booting and Shutting Down Oracle Solaris 11.3 Systems.

  2. Launch the Format utility.
    # format
  3. Type the number of the disk that you need to recover.
    Specify disk (enter its number):

    If the utility can configure the selected, the utility displays the following message:

    disk: configured with capacity of size
  4. Select one of the following to determine how to label the disk.
    • If the disk was configured successfully, do the following:
      1. At the format > prompt, type verify.

        The verification process includes searching for the disk's backup label.

      2. Ensure that the contents of the retrieved backup label appear satisfactory.
      3. At the format > prompt, type backup to apply the label.
      4. When prompted, confirm the command.
    • If the disk was not configured successfully, do the following:
      1. At the format > prompt of the Format Menu, type type.

        The Available Drives Type menu is displayed.

      2. Type the number that corresponds to the disk's type.
      3. When prompted to proceed with labeling the disk, type no.
      4. At the format > prompt, type verify.

        The verification process includes searching for the disk's backup label.

      5. Ensure that the contents of the retrieved backup label appear satisfactory.
      6. At the format > prompt, type backup to apply the label.
      7. When prompted, confirm the command.
  5. After the label is restored, exit the Format utility.
  6. Verify the file systems on the recovered disk.

    For information about using the zpool scrub command for ZFS file systems, see the zpool(1M) man page.

Example 48  Recovering the Label of an Autoconfigured Disk

This example assumes that you have already selected the disk whose label you want to recover.

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

After the backup label is retrieved and you ensure that the contents are satisfactory, proceed with applying the label.

format> backup
Disk has a primary label, still continue? y

Searching for backup labels...found.
Restoring primary label

format> q
Example 49  Recovering the Label of a Disk Not Automatically Configurable

This example assumes that you have already selected the disk whose label you want to recover.

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  = <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

After the backup label is retrieved and you ensure that the contents are satisfactory, proceed with applying the label.

format> backup
Disk has a primary label, still continue? y
Searching for backup labels...found.
Restoring primary label

format> q