The state database contains the configuration and status information of all volumes, hot spares and disk sets. To provide redundancy we create multiple copies of the state database called as state database replicas. Now in case of losing any state database replica SVM determines the valid state database replica by using majority consensus algorithm. According to the algorithm it is required to have atleast (half + 1) to be available at boot time to be able to consider any of them to be valid. Each replica takes around 4 MB of size. It is ideal to create 3 of them on each disk in case you are mirroring the root disk. The post describes the meaning of the fields displayed in the metadb -i command.
When running “metadb -i” command the following output is displayed:
For example:
# metadb -i flags first blk block count a u 16 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a u 8208 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a u 16400 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0
r - replica does not have device relocation information o - replica active prior to last mddb configuration change u - replica is up to date l - locator for this replica was read successfully c - replica's location was in /etc/lvm/mddb.cf p - replica's location was patched in kernel m - replica is master, this is replica selected as input W - replica has device write errors a - replica is active, commits are occurring to this replica M - replica had problem with master blocks D - replica had problem with data blocks F - replica had format problems S - replica is too small to hold current data base R - replica had device read errors
The characters in front of the device name represent the status of the state database. Explanations of the characters are displayed following the replicas status
The flags “m”,”p”,”c”,”l”,”o” are only set after reboot:
For example :
# metadb - a -f -c 3 /dev/rdsk/c3t600A0B800011BABC000036A151C1B85Ad0s0
# metadb flags first blk block count a u 16 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a u 8208 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a u 16400 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0
# reboot
# metadb flags first blk block count a m pc luo 16 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a pc luo 8208 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0 a pc luo 16400 8192 /dev/dsk/c3t600A0B800011BABC000036A151C1B85Ad0s0
t = tagged data is associated with replicas r = replica does not have device relocation information