A short guide on how to recover a broken DiskSuite mirror.

  1. Check metastat information:
    # metastat -c
    d30 m 34GB d31 (maint) d32

      d31 s 34GB c0t0d0s3 (maint)
      d32 s 34GB c0t1d0s3

    d20 m 4.0GB d21 (maint) d22

      d21 s 4.0GB c0t0d0s1 (maint)
      d22 s 4.0GB c0t1d0s1

    d10 m 30GB d11 (maint) d12

      d11 s 30GB c0t0d0s0 (maint)
      d12 s 30GB c0t1d0s0

    hsp001 h -

  2. Remove the broken replicas from the metadb :
    # metadb -i
    flags first blk block count
    W p l 16 8192 /dev/dsk/c0t0d0s7
    W p l 8208 8192 /dev/dsk/c0t0d0s7
    a m p luo 16 8192 /dev/dsk/c0t1d0s7
    a p luo 8208 8192 /dev/dsk/c0t1d0s7
    . . .

    # metadb -d /dev/dsk/c0t0d0s7

  3. Replace the broken disk
  4. Check that the new disk is visible:
    # format
    Searching for disks…done

    AVAILABLE DISK SELECTIONS:

      0. c0t0d0
      /pci@1c,600000/scsi@2/sd@0,0
      1. c0t1d0
      /pci@1c,600000/scsi@2/sd@1,0
  5. Copy the partition table from the healthy to the new disk:
    # prtvtoc /dev/rdsk/c0t1d0s0 | fmthard -s – \
    /dev/rdsk/c0t0d0s0
    fmthard: New volume table of contents now in place.
  6. Create metadb replicas (for example, 2 copies in slice 7):
    # metadb -a -c2 /dev/rdsk/c0t0d0s7
  7. Verifying the metadb:
    # metadb -i

      flags first blk block count

    a u 16 8192 /dev/dsk/c0t0d0s7
    a u 8208 8192 /dev/dsk/c0t0d0s7
    a p luo 16 8192 /dev/dsk/c0t1d0s7
    a p luo 8208 8192 /dev/dsk/c0t1d0s7

  8. "Metareplace" the failed slices:
    # metastat | fgrep replace
    Invoke: metareplace d30 c0t0d0s3
    Invoke: metareplace d20 c0t0d0s1
    Invoke: metareplace d10 c0t0d0s0

    # metareplace -e d30 c0t0d0s3
    d30: device c0t0d0s3 is enabled
    # metareplace -e d20 c0t0d0s1
    d20: device c0t0d0s1 is enabled
    # metareplace -e d10 c0t0d0s0
    d10: device c0t0d0s0 is enabled

  9. Periodically check the resyncing status:
    # metastat | fgrep esync
    State: Resyncing
    Resync in progress: 0 % done
    State: Resyncing
    c0t0d0s3 0 No Resyncing Yes
    State: Resyncing
    Resync in progress: 19 % done
    State: Resyncing
    c0t0d0s1 0 No Resyncing Yes
    State: Resyncing
    Resync in progress: 2 % done
    State: Resyncing
    c0t0d0s0 0 No Resyncing Yes

Related posts:

  1. Solaris and external USB disks Short tutorial on how to connect, format, mount, detach and...
  2. Solaris 11 EA (b173) ZFS pool versions Solaris 11 EA (Sep 2011 build 173) updated zpool version...