Solaris Troubleshooting : Removing Root Disk from Disksuite Control
This procedure removes the root disk from DiskSuite control while leaving all other data under DiskSuite intact.
A. Boot system from CD-ROM or Single User Mode ( using Single usermode, you have to be careful to not miss any of the configuration changes).
B. Restore or modify necessary files.
C. Disable DiskSuite on the root partition(s).
D. Boot system.
E. Re-mirror root disk.
Please be sure to substitute the system disk name (i.e., c0t0d0) in the example commands below. This example uses “c0t0d0”.
1. Boot from CD-ROM, and perform the file recovery necessary to boot the system. This may be as drastic as running ‘newfs’ and ‘ufsrestore’ on each slice of the boot disk, or as simple as editing the /etc/passwd file, to remove an unknown root password. Remember, if the root partition is being restored from a backup tape, the boot block will need to be installed as well. NOTE: There may not be any recovery required at all … it depends on WHY the system will not boot.
2. Mount the root partition onto /a. It may be required to run ‘fsck’ on this partition before it can be mounted.
# mount /dev/dsk/c0t0d0s0 /a
3. Edit the /etc/system file, and remove/comment the “rootdev” line shown below:
# vi /a/etc/system * rootdev:/pseudo/md@0:0,0,blk
4. In the /etc/vfstab file, replace the lines for the system file system metadevices with their underlying partitions.
For example, change lines from:
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no –
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no –
ONLY change the lines for root (/) and the file systems which were affected by the actions taken in step 1 above. All other metadevices, may stay ‘as is’, in this file.
5. Unmount and check the root file system. Then stop the system.
# cd / # umount /a # fsck /dev/rdsk/c0t0d0s0 STOP-A (L1-A)
5a. At OBP enter
ok printenv boot-device
Check if the recently mounted disk, is the first entry in the list of devices. For instance:
boot-device = sds-disk sds-mirror
ok devalias sds-disk /ssm@0,0/pci@18,700000/pci@1/SUNW,isptwo@4/sd@0,0
–> make sure this device is disk c0t0d0, from the previous commands.
ok devalias sds-mirror /ssm@0,0/pci@1c,700000/pci@1/SUNW,isptwo@4/sd@0,0
If not, specify the disk from which you want to boot.
6. Boot to single-user mode. THIS IS VERY IMPORTANT. THE SYSTEM MUST BE BOOTED TO SINGLE USER MODE TO AVOID FILE SYSTEM CORRUPTION.
ok boot -sw
If the system does not boot to single user mode, it is possible that a mistake was made in the above steps.
7. Enter the root password when prompted. Once in single-user mode, clear the metamirrors and all the submirrors of all the system file systems.
For example, to clear the root (/), /usr, and /var metamirrors,identified as d0, d1, and d2, respectively, run the command:
# metaclear -f -r d0 d1 d2
This will not only clear the metamirrors but also the submirrors which are part of these mirrors.
Note: If the machine has been restored from a backup, extra commands may be required to address the replicas (a bad trap can be received during boot). If the machine has not been restored from backup, skip to step 8.
7a. List the existing state databases on the system:
# metadb -i
flags first blk block counta m p luo 16 8192 /dev/dsk/c1t1d0s7a p luo 8208 8192 /dev/dsk/c1t1d0s7a p luo 16400 8192 /dev/dsk/c1t1d0s7a p luo 16 8192 /dev/dsk/c1t0d0s7a p luo 8208 8192 /dev/dsk/c1t0d0s7p luo 16400 8192 /dev/dsk/c1t0d0s7
7b. Remove the state databases (the -f switch is only required for removing the last DB). This command needs to be completed for all state databases.
# metadb [-f] -d
8. Once the metamirrors are cleared, continue the boot up to multi-user mode, by issuing either a CTRL-D or entering:
9. Now everything should be as it was, except that the system partitions are on the underlying partitions, and are not mirrored. Simply re-create the replicas and metadevices for the root mirror, as had been done originally.