Solaris Recovery of the Failed Mirrored Boot Disk

ok boot altboot

28.3.2 Solaris Recovery of the Failed Mirrored Boot Disk

The following procedure refers to the Solaris system recovery when one of the mirrored boot disks fails, and the implemented Disk Manager is DiskSuite 4.1. The procedure itself is sufficiently general for many different hardware configurations. The tested configuration consisted of two SCSI disks: c0t3do − prime boot disk • c0t1d0 − mirrored disk • The test included removal of the prime boot disk, and the system power recycling. Afterward, the disk was returned into the system. root mirror d10 − d11 c0t3d0s0 d12 c0t1d0s0 swap mirror d20 − d21 c0t3d0s1 d22 c0t1d0s1 altboot ufs mirror d30 − d31 c0t3d0s3 d32 c0t1d0s3 dedicated partitions slices c0t3d0s7 and c0t1d0s7 are used for metadevice database replicas each for three replicas The system was shut down, and the prime boot disk taken out. The system was rebooted again with a single disk mirrored boot disk. A number of warning and error messages were displayed during the system startup mostly related to the read−only or missing files. The system has required maintenance − single−user mode The System Recovery Bring the system into the single−user mode, enter the root password. 1. Remove metadevice db replicas from the broken disk the quotes are used because the disk was not really broken: cd usroptSUNWmdsbin Check the current status — should be six replicas: . metadb Remove replicas: . metadb −d c0t3dos7 Check again — should be three replicas: . metadb 2. Unmirror detach all mirrors — must be done forcibly: 3. 699 d10: Submirror d11 is detached metadetach −f d20 d21 d20: Submirror d21 is detached metadetach −f d30 d31 d30: Submirror d31 is detached Keep in mind that concatssubmirrors d11, d21, and d31 belong to the broken disk — prime root disk c0t3d0; otherwise should be d12, d22, and d32. Reboot the system, type: reboot. The system should boot into multiuser mode with a single disk; everything appears to be correct. Log in as root. To check the status: metastat The concatssubmirrors from the broken disk in this case d11, d21, and d31 need maintenance 4. Reinstall the disk. Power−off the system. poweroff or halt ok power−off Return reinstall the disk and power−on the system. 5. Recreate database replicas. Log in as root. Check the current status — should be three replicas: metadb Add three more replicas for the returned disk: metadb −a −c 3 c0t3dos7 Check again — should be six replicas: metadb Check the status of metadevices: metastat Reboot the system: reboot −− disk1 6. Remirror disks. 7. 700 metadb Mirror reattach concatssubmirrors: metattach d10 d11 d10: Submirror d11 is attached metattach d20 d21 d20: Submirror d21 is attached metattach d30 d31 d30: Submirror d31 is attached Check for completion of mirroring recycling. To check the status of mirroring recycling type: metastat 8. Reboot the system when recycling is complete: reboot Disk Replacement — If the mirrored disk is broken, this disk must be replaced this is the most probable case, and the new empty disk must be prepared for mirroring. Supposing three partitions with root filesystem , swap, and additional filesystem altboot, the procedure to replace and remirror the disk is: 9. Partition the disk c0t3d0 to match the boot disk c0t1d0. Use format utility. 1. Type: format Select the boot disk: c0t1d0 Type: partition p is sufficient Type: print p is sufficient to see current root partitioning Type: quit q is sufficient Type: disk to select the new disk c0t3d0 Type: partition Create all partitions as on the root disk Type: label to save a new partitioning table into the disk Ready to label disk, continue? y 2. Create state database replicas in a new disk pay attention to identify the partitionslice s7: metadb −a −c 3 c0t3d0s7 Three additional db replicas will be created in a dedicated slice s7 of the new disk. To check created db replicas: metadb 3. Reboot the system — type: reboot. 4. Mirror root filesystem. Create the concatsubmirror d11: metainit −f d11 1 1 c0t3d0s0 d11: ConcatStripe is setup Attach concatsubmirror d11 to the mirror d10: 5. 701 d10: Submirror d11 is attached Mirroring itself will take awhile Mirror swap. Create the concatsubmirror d21: metainit −f d21 1 1 c0t3d0s1 d21: ConcatStripe is setup Attach concatsubmirror d21 to the mirror d20: metattach d20 d21 d20: Submirror d21 is attached Mirroring itself will take awhile 6. Mirror altboot. Create the concatsubmirror d31: metainit −f d31 1 1 c0t3d0s3 d31: ConcatStripe is setup Attach concatsubmirror d31 to the mirror d30: metattach d30 d31 d30: Submirror d31 is attached Mirroring itself will take awhile 7. Check for completion of mirroring recycling. To check the status of mirroring recycling type: metastat 8. Reboot the system when recycling is complete: reboot 9.

28.3.3 HP−UX Support Disk Usage