Recover Solaris OS when metadb is Corrupted
Netra 210, No Keyboard
Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved.
OpenBoot X.XX.X, 1024 MB memory installed, Serial #XXXXXXX.
Ethernet address X:X:XX:XX:XX:XX, Host ID: XXXXXX.
ok boot
Cannot mount root on /pseudo/md@0:0,0,blk fstype ufs
panic[cpu0]/thread=140a000: vfs_mountroot: cannot mount root
0000000001409970 genunix:vfs_mountroot+70 (0, 0, 0, 200, 14581f0, 0)
%l0-3: 000000000144bc00 000000000144bc00 0000000000002000 00000000014957a8
%l4-7: 000000000149b400 0000000001411e58 000000000144c400 000000000144f400
0000000001409a20 genunix:main+90 (1409ba0, f0059684, 1409ec0, 39c65f, 2000, 500)
%l0-3: 0000000000000001 000000000140a000 0000000001412fc8 0000000000000000
%l4-7: 0000000078002000 000000000039e000 00000000014a3c28 0000000001066fb8
skipping system dump – no dump device configured
rebooting…
SC Alert: Host System has Reset
SC Alert: CRITICAL ALARM is set
SC Alert: Failed to send email alert for recent event.
1. First, go to ok prompt.
#init 0 –> in OS
sc> break -y –> in ALOM
2. At the ok prompt, boot the CD-ROM.
ok boot cdrom -s
3. After booting, mount the root slice:
# mount /dev/dsk/c1t1d0s0 /a
4. Edit /a/etc/system file to delete everything between:
Begin MDD root info (Do not edit this line.)
End MDD root info (Do not edit this line.)
5. Edit /a/etc/vfstab file to replace all the /dev/md/dsk entries to /dev/dsk.
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d5 /dev/md/rdsk/d5 /opt ufs 2 yes -
/dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no -
/dev/md/dsk/d7 /dev/md/rdsk/d7 /data1 ufs 2 yes -
/dev/md/dsk/d6 /dev/md/rdsk/d6 /data ufs 2 yes -
swap - /tmp tmpfs - yes -
to
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t1d0s1 - - swap - no -
/dev/dsk/c1t1d0s0 /dev/rdsk/c1t1d0s0 / ufs 1 no -
/dev/dsk/c1t1d0s5 /dev/rdsk/c1t1d0s5 /opt ufs 2 yes -
/dev/dsk/c1t1d0s4 /dev/rdsk/c1t1d0s4 /var ufs 1 no -
/dev/dsk/c1t1d0s7 /dev/rdsk/c1t1d0s7 /data1 ufs 2 yes -
/dev/dsk/c1t1d0s6 /dev/rdsk/c1t1d0s6 /data ufs 2 yes -
swap - /tmp tmpfs - yes -
Note:
Please be careful when editing the /etc/vfstab, if you forgot the device to mount, check either below file:
/kernel/drv/md.conf
/etc/lvm/mddb.cf
/etc/lvm/md.cf
7. Then try to boot the disk.
Note:
Make sure to backup /etc/system, /etc/vfstab, /etc/lvm/md.cf,/etc/lvm/mddb.cf, /kernel/drv/md.conf before edit.
Example: cp /etc/system /a/etc/system.original
Related posts:
blog comments powered by Disqus

Ok, once the system reboots, how do you recover the metadb?