BigAdmin System Administration Portal
Community-Submitted Tech Tips
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

System Recovery for the Solaris OS When the Meta Database Is Deleted Accidentally

Victor Feng, May 2008

This tech tip provides a recovery procedure that can be used when a meta database is accidentally destroyed or corrupted on a system that runs the Solaris 9 or 10 Operating System and Solaris Volume Manager.

How Could the Meta Database Be Destroyed?

This could happen in many ways. One of my test boxes had two versions of the Solaris OS on different disks. The Solaris 9 OS was mirrored on disk0 and disk1, and its meta database replicas were on slice 3 of disk0 and disk1. The Solaris 10 OS, which was not mirrored, was on disk3.

From previous work I did on that machine, the Solaris 10 OS had meta database replicas in slice 3 of disk0 and disk1. I ran metadb -d and all the replicas were deleted. Then I rebooted the machine, whose default boot disk was disk0 and whose auto-boot? parameter was true, and I saw following messages over and over:

Rebooting with command: boot
Boot device: disk0  File and args:
SunOS Release 5.9 Version Generic_122300-21 64-bit
Copyright 1983-2003 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Cannot mount root on /pseudo/md@0:0,0,blk fstype ufs

panic[cpu1]/thread=140a000: vfs_mountroot: cannot mount root

0000000001409970 genunix:vfs_mountroot+70 (0, 0, 0, 200, 1472178, 0)
  %l0-3: 0000000001465800 0000000001465800 0000000000002000
  00000000014af400
  %l4-7: 00000000014b5000 0000000001411e88 0000000001466000
  0000000001469400
0000000001409a20 genunix:main+90 (1409ba0, f005ea98, 1409ec0, 393d61,
  2000, 500)
  %l0-3: 0000000000000001 000000000140a000 0000000001413048
  0000000000000000
  %l4-7: 0000000078002000 000000000039c000 00000000014bdc10
  0000000001067e98

skipping system dump - no dump device configured
rebooting...

How to Solve the Problem

1. First, we need to halt the repeated rebooting to the OpenBoot PROM ok prompt.

If you are using ALOM (Advanced Light Out Management) from a remote desktop, type #. to go to System Controller console's sc> prompt. Then type break -y. Then type console -f to go back to the ok prompt.

If you are using a console in the server room, press the Stop-A, L1-A, or Break keys.

2. After you see the ok prompt, you can boot from CD-ROM (or boot from disk3, in my situation).

3. After booting to the machine, mount the root slice of disk0, for example:

# mount /dev/dsk/c1t0d0s0 /mnt

4. Modify the /mnt/etc/system file to delete everything between the following two lines:

Begin MDD root info (Do not edit this line.)

End MDD root info (Do not edit this line.)

5. Modify the /mnt/etc/vfstab file to replace all the /dev/md/dsk entries with /dev/dsk.

Note: If you do not have records for meta devices, using the command format to check out the size of each slice helps.

6. Solaris Volume Manager information is stored in three files: /kernel/drv/md.conf, /etc/lvm/mddb.cf, and /etc/lvm/md.cf. Overwrite these files with the files from a system that does not use Solaris Volume Manager:

# cp /kernel/drv/md.conf /mnt/kernel/drv/md.conf
# cp /etc/lvm/mddb.cf /mnt/etc/lvm/mddb.cf
# cp /etc/lvm/md.cf /mnt/etc/lvm/md.cf

7. Then boot from disk0, and it will work.

The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.
 
 

Comments (latest comments first)

Discuss and comment on this resource in the BigAdmin Wiki

Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License.


BigAdmin