Tuesday, February 21, 2012

Troubleshooting Metadb replicas (SVM)


 Problem: State database corrupted or unavailable. Recovering from Stale State
Database Replicas

Cause: Disk failure , Disk I/O error.

Symptom: Error message at the booting time if databases are <= 50% of total
database. System comes to Single user mode.
ok boot
Hostname: host1
metainit: Host1: stale databases
Insufficient metadevice database replicas located.
Use metadb to delete databases which are broken.
Ignore any "Read-only file system" error messages.
Reboot the system when finished to reload the metadevice database.
After reboot, repair any broken database replicas which were deleted.
Type Ctrl-d to proceed with normal startup, (or give root password for system
maintenance): <root-password>
Entering System Maintenance Mode.
1. Use the metadb command to look at the metadevice state database and see which
state database replicas are not available. Marked by unknown and M flag.
# /usr/opt/SUNWmd/metadb -i
flags first blk block count
a m p lu 16 1034 /dev/dsk/c0t3d0s3
a p l 1050 1034 /dev/dsk/c0t3d0s3
M p unknown unknown /dev/dsk/c1t2d0s3
M p unknown unknown /dev/dsk/c1t2d0s3
2. Delete the state database replicas on the bad disk using the -d option to the metadb
(1M) command. At this point, the root (/) file system is read-only. You can ignore the
mddb.cf error messages:
# /usr/opt/SUNWmd/metadb -d -f c1t2d0s3
metadb: demo: /etc/opt/SUNWmd/mddb.cf.new: Read-only file system .
Verify deletion
# /usr/opt/SUNWmd/metadb -i
flags first blk block count
a m p lu 16 1034 /dev/dsk/c0t3d0s3
a p l 1050 1034 /dev/dsk/c0t3d0s3
3. Reboot.
4. Use the metadb command to add back the state database replicas and to see that the
state database replicas are correct.
# /usr/opt/SUNWmd/metadb -a -c 2 c1t2d0s3
# /usr/opt/SUNWmd/metadb
flags first blk block count a m
p luo 16 1034 dev/dsk/c0t3d0s3
a p luo 1050 1034 dev/dsk/c0t3d0s3
a u 16 1034 dev/dsk/c1t2d0s3
a u 1050 1034 dev/dsk/c1t2d0s3

No comments:

Post a Comment