Solaris Volume Manager Administration Guide

Recovering Storage From a Different System

You can recover a Solaris Volume Manager configuration, even onto a different system from the original system.

ProcedureHow to Recover Storage From a Local Disk Set

If you experience a system failure, you can attach the storage to a different system and recover the complete configuration from the local disk set. For example, assume you have a system with an external disk pack of six disks in it and a Solaris Volume Manager configuration, including at least one state database replica, on some of those disks. If you have a system failure, you can physically move the disk pack to a new system and enable the new system to recognize the configuration. This procedure describes how to move the disks to another system and recover the configuration from a local disk set.

Steps
  1. Attach the disk or disks that contain the Solaris Volume Manager configuration to a system with no preexisting Solaris Volume Manager configuration.

  2. Do a reconfiguration reboot to ensure that the system recognizes the newly added disks.


    # reboot -- -r
    
  3. Determine the major/minor number for a slice containing a state database replica on the newly added disks.

    Use ls -lL, and note the two numbers between the group name and the date. These numbers are the major/minor numbers for this slice.


    # ls -Ll /dev/dsk/c1t9d0s7
    brw-r-----   1 root     sys       32, 71 Dec  5 10:05 /dev/dsk/c1t9d0s7
  4. If necessary, determine the major name corresponding with the major number by looking up the major number in /etc/name_to_major.


    # grep " 32" /etc/name_to_major  sd 32
    
  5. Update the /kernel/drv/md.conf file with two commands. One command instructs Solaris Volume Manager where to find a valid state database replica on the new disks. The other command instructs Solaris Volume Manager to trust the new replica and ignore any conflicting device ID information on the system.

    For example, in the line that begins with mddb_bootlist1, replace the sd with the major name you found in step 4. Replace 71 in the example with the minor number you identified in Step 3.


    #pragma ident   "@(#)md.conf    2.1     00/07/07 SMI"
    #
    # Copyright (c) 1992-1999 by Sun Microsystems, Inc.
    # All rights reserved.
    #
    name="md" parent="pseudo" nmd=128 md_nsets=4;
    #
    #pragma ident   "@(#)md.conf    2.1     00/07/07 SMI"
    #
    # Copyright (c) 1992-1999 by Sun Microsystems, Inc.
    # All rights reserved.
    #
    name="md" parent="pseudo" nmd=128 md_nsets=4;
    # Begin MDD database info (do not edit)
    mddb_bootlist1="sd:71:16:id0";  md_devid_destroy=1; \
    # End MDD database info (do not edit)
  6. Reboot to force Solaris Volume Manager to reload your configuration.

    You will see messages, similar to the following, displayed on the console.


    volume management starting.
    Dec  5 10:11:53 lexicon metadevadm: Disk movement detected
    Dec  5 10:11:53 lexicon metadevadm: Updating device names in 
    Solaris Volume Manager
    The system is ready.
  7. Verify your configuration. Use the metadb command to verify the status of the state database replicas. and metastat command view the status for each volume.


    # metadb
            flags           first blk       block count
         a m  p  luo        16              8192            /dev/dsk/c1t9d0s7
         a       luo        16              8192            /dev/dsk/c1t10d0s7
         a       luo        16              8192            /dev/dsk/c1t11d0s7
         a       luo        16              8192            /dev/dsk/c1t12d0s7
         a       luo        16              8192            /dev/dsk/c1t13d0s7
    # metastat
    d12: RAID
        State: Okay         
        Interlace: 32 blocks
        Size: 125685 blocks
    Original device:
        Size: 128576 blocks
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t11d0s3                330     No    Okay         Yes    
            c1t12d0s3                330     No    Okay         Yes    
            c1t13d0s3                330     No    Okay         Yes    
    
    d20: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                     3592                     8192
    
    d21: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                    11785                     8192
    
    d22: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                    19978                     8192
    
    d10: Mirror
        Submirror 0: d0
          State: Okay         
        Submirror 1: d1
          State: Okay         
        Pass: 1
        Read option: roundrobin (default)
        Write option: parallel (default)
        Size: 82593 blocks
    
    d0: Submirror of d10
        State: Okay         
        Size: 118503 blocks
        Stripe 0: (interlace: 32 blocks)
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t9d0s0                   0     No    Okay         Yes    
            c1t10d0s0               3591     No    Okay         Yes    
    
    
    d1: Submirror of d10
        State: Okay         
        Size: 82593 blocks
        Stripe 0: (interlace: 32 blocks)
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t9d0s1                   0     No    Okay         Yes    
            c1t10d0s1                  0     No    Okay         Yes    
    
    
    Device Relocation Information:
    Device       Reloc    Device ID
    c1t9d0       Yes      id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3487980000U00907AZ
    c1t10d0      Yes      id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3397070000W0090A8Q
    c1t11d0      Yes      id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3449660000U00904NZ
    c1t12d0      Yes      id1,sd@SSEAGATE_ST39103LCSUN9.0GLS32655400007010H04J
    c1t13d0      Yes      id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3461190000701001T0
    # 
    # metadb         
            flags           first blk       block count
         a m  p  luo        16              8192            /dev/dsk/c1t9d0s7
         a       luo        16              8192            /dev/dsk/c1t10d0s7
         a       luo        16              8192            /dev/dsk/c1t11d0s7
         a       luo        16              8192            /dev/dsk/c1t12d0s7
         a       luo        16              8192            /dev/dsk/c1t13d0s7
    # metastat 
    d12: RAID
        State: Okay         
        Interlace: 32 blocks
        Size: 125685 blocks
    Original device:
        Size: 128576 blocks
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t11d0s3                330     No    Okay         Yes    
            c1t12d0s3                330     No    Okay         Yes    
            c1t13d0s3                330     No    Okay         Yes    
    
    d20: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                     3592                     8192
    
    d21: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                    11785                     8192
    
    d22: Soft Partition
        Device: d10
        State: Okay
        Size: 8192 blocks
            Extent              Start Block              Block count
                 0                    19978                     8192
    
    d10: Mirror
        Submirror 0: d0
          State: Okay         
        Submirror 1: d1
          State: Okay         
        Pass: 1
        Read option: roundrobin (default)
        Write option: parallel (default)
        Size: 82593 blocks
    
    d0: Submirror of d10
        State: Okay         
        Size: 118503 blocks
        Stripe 0: (interlace: 32 blocks)
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t9d0s0                   0     No    Okay         Yes    
            c1t10d0s0               3591     No    Okay         Yes    
    
    
    d1: Submirror of d10
        State: Okay         
        Size: 82593 blocks
        Stripe 0: (interlace: 32 blocks)
            Device              Start Block  Dbase State        Reloc  Hot Spare
            c1t9d0s1                   0     No    Okay         Yes    
            c1t10d0s1                  0     No    Okay         Yes    
    
    
    Device Relocation Information:
    Device         Reloc    Device ID
    c1t9d0         Yes     id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3487980000U00907AZ1
    c1t10d0        Yes     id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3397070000W0090A8Q
    c1t11d0        Yes     id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3449660000U00904NZ
    c1t12d0        Yes     id1,sd@SSEAGATE_ST39103LCSUN9.0GLS32655400007010H04J
    c1t13d0        Yes     id1,sd@SSEAGATE_ST39103LCSUN9.0GLS3461190000701001T0
    # metastat -p
    d12 -r c1t11d0s3 c1t12d0s3 c1t13d0s3 -k -i 32b
    d20 -p d10 -o 3592 -b 8192 
    d21 -p d10 -o 11785 -b 8192 
    d22 -p d10 -o 19978 -b 8192 
    d10 -m d0 d1 1
    d0 1 2 c1t9d0s0 c1t10d0s0 -i 32b
    d1 1 2 c1t9d0s1 c1t10d0s1 -i 32b
    #

Recovering Storage From a Known Disk Set

The introduction of device ID support for disk sets in Solaris Volume Manager allows you to recover storage from known disk sets. The metaimport command allows you to import known disk sets from one system to another system. Both systems must contain existing Solaris Volume Manager configurations that include device ID support. For more information on device ID support, see Asynchronous Shared Storage in Disk Sets.

Before you import a disk set, make sure that the value of the nmd field in the /kernel/drv/md.conf file is set to include the namespace of the volumes you are importing. If the disk set has volumes with names outside of the range set by the nmd field, the import fails. Set the value of the nmd field to include the namespace of the volumes, reboot the system, and then perform the import. For example, if the disk set has a volume named d200, the import fails if nmd is set to 128. You need to increase the value of the nmd field to at least 201 for the import to succeed. For information and procedures associated with changing the nmd field, see How to Increase the Number of Default Volumes.

ProcedureHow to Print a Report on Disk Sets Available for Import

Steps
  1. Become superuser.

  2. Obtain a report on disk sets available for import.


    # metaimport -r -v
    
    -r

    Provides a report of the unconfigured disk sets available for import on the system.

    -v

    Provides detailed information about the state database replica location and status on the disks of unconfigured disk sets available for import on the system.


Example 26–3 Reporting on Disk Sets Available for Import

The following example shows how to print a report on disk sets available for import.


# metaimport -r
Drives in diskset including disk c1t2d0:
  c1t2d0
  c1t3d0
  c1t8d0
More info:
  metaimport -r -v c1t2d0
Import:
  metaimport -s <newsetname> c1t2d0

# metaimport -r -v c1t2d0
Import: metaimport -s <newsetname> c1t2d0
Last update: Mon Dec 29 14:13:35 2003
Device       offset       length replica flags
c1t2d0           16         8192      a        u     
c1t3d0           16         8192      a        u     
c1t8d0           16         8192      a        u     

ProcedureHow to Import a Disk Set From One System to Another System

Steps
  1. Become superuser.

  2. Determine if the volume names are within the range of the nmd value. Modify the nmd field in /kernel/drv/md.conf, if needed. For more information on modifying the nmd field, see How to Increase the Number of Default Volumes.

  3. Verify that a disk set is available for import.


    # metaimport -r -v
    
  4. Import an available disk set.


    # metaimport -s diskset-name drive-name
    
    - s diskset-name

    Specifies the name of the disk set being created.

    drive-name

    Identifies a disk (c#t#d#) containing a state database replica from the disk set being imported.

  5. Verify that the disk set has been imported.


    # metaset -s diskset-name
    

Example 26–4 Importing a Disk Set

The following example shows how to import a disk set.


# metaimport -s red c1t2d0
Drives in diskset including disk c1t2d0:
  c1t2d0
  c1t3d0
  c1t8d0
More info:
  metaimport -r -v c1t2d0
# metaset -s red


Set name = red, Set number = 1

Host                Owner
  lexicon            Yes

Drive    Dbase

c1t2d0   Yes  

c1t3d0   Yes  

c1t8d0   Yes