• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris Volume Manager (SVM) : Understanding metadb Flags

by admin

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

Filed Under: Solaris, SVM

Some more articles you might also be interested in …

  1. M4000 / M5000 : How to assign IP address to XSCFU
  2. Solaris 11 : Increasing the size of a vdisk in LDom ( with backend device as ZFS volume )
  3. How to replace a disk under ZFS in Solaris
  4. How to Configure TCP Keepalive option in Solaris
  5. How to determine link status (up/down) of network interfaces in Solaris
  6. SVM – How to create Soft Partitions
  7. Complete Hardware Reference : SPARC T3-1 / T3-2 / T3-4
  8. How to delegate SMF management to a non-root user in Solaris
  9. How to configure NTP client in Solaris 8,9,10 and non-global zones
  10. SVM : How to Use Metadevadm to Maintain Device Relocation Information After Disk Replacement

You May Also Like

Primary Sidebar

Recent Posts

  • ncat Command Examples in Linux
  • ncat: command not found
  • nautilus Command Examples in Linux
  • namei: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright