This section describes a technique for regaining access to a metadevice that is defined on a failing controller, causing sporadic system panics. If there is another available controller on the system, the metadevice can in effect be "moved" to the new controller by moving the disks to the controller and redefining the metadevice. This technique does away with the need to back up and restore data to the metadevice.
This example consists of a disk that has two slices that are each part of two separate striped metadevices, d100 and d101, containing file systems /user6 and /maplib1, respectively. The affected controller was c5; the disks will be moved to a free controller (c4). This example also uses the md.tab file.
Stop access to the affected stripes.
For example, unmount any file systems associated with the striped metadevice.
# umount /user6 # umount /maplib1 |
Use metaclear to clear the striped metadevice.
# metaclear d100 d100: Concat/Stripe is cleared # metaclear d101 d101: Concat/Stripe is cleared |
Shut down the server and move the disks to the new controller.
Edit the md.tab file to indicate the new controller in the metadevice names. This example uses "c4" not "c5" for the disk, because the disk was moved to controller 4.
Lines from the md.tab file before change: # Stripe /user6 /dev/md/dsk/d100 1 2 /dev/dsk/c5t0d0s3 /dev/dsk/c2t2d0s3 # Stripe /maplib1 /dev/md/dsk/d101 1 2 /dev/dsk/c5t0d0s0 /dev/dsk/c2t2d0s0 after change: # Stripe /user6 /dev/md/dsk/d100 1 2 /dev/dsk/c4t0d0s3 /dev/dsk/c2t2d0s3 # Stripe /maplib1 /dev/md/dsk/d101 1 2 /dev/dsk/c4t0d0s0 /dev/dsk/c2t2d0s0 |
Use metainit to initialize that striped metadevices and mount it, without reinitializing the file system with newfs.
# metainit d100 d100: Concat/Stripe is setup # metainit d101 d101: Concat/Stripe is setup |
Run metastat to verify that the metadevices are online.
Don't run the newfs command on the metadevice or its associated file system. It will result in a massive data loss, and the need to restore from tape.