This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Thursday, November 5, 2015

What are the Metadata Contents available in LVM?

The volume group metadata contains:
    ·         Information about how and when it was created
    ·         Information about the volume group:

The volume group information contains:
    ·         Name and unique id
    ·         A version number which is incremented whenever the metadata gets updated
    ·         Any properties: Read/Write? Resizeable?
    ·         Any administrative limit on the number of physical volumes and logical volumes it may contain
    ·         The extent size (in units of sectors which are defined as 512 bytes)

An unordered list of physical volumes making up the volume group, each with:
    ·         Its UUID, used to determine the block device containing it
    ·         Any properties, such as whether the physical volume is allocatable
    ·         The offset to the start of the first extent within the physical volume (in sectors)
    ·         The number of extents

 An unordered list of logical volumes. Each consisting of
        An ordered list of logical volume segments. For each segment the metadata includes a mapping applied to an ordered list of physical volume segments or logical volume segments.

Sample Metadata Contents.

# Generated by LVM2 version 2.02.88(2)-RHEL5 (2012-01-20): Sat Mar 21 15:44:51 2015

contents = "Text Format Volume Group"
version = 1

description = "Created *before* executing '/usr/sbin/vgs --noheadings -o name'"

creation_host = "testserver.com"    # Linux testserver.com 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:37:40 EST 2012 x86_64
creation_time = 1426945491      # Sat Mar 21 15:44:51 2015

VolGroup00 {
        id = "ZfQCQ1-suTc-ykV9-TwvN-ACpB-XcEM-NuWlnE"
        seqno = 3
        status = ["RESIZEABLE", "READ", "WRITE"]
        flags = []
        extent_size = 65536             # 32 Megabytes
        max_lv = 0
        max_pv = 0
        metadata_copies = 0

        physical_volumes {

                pv0 {
                        id = "36bcud-E3uI-NPeG-BfTe-ePx0-FEpQ-un5N5F"
                        device = "/dev/xvda2"   # Hint only

                        status = ["ALLOCATABLE"]
                        flags = []
                        dev_size = 104647410    # 49.8998 Gigabytes
                        pe_start = 384
                        pe_count = 1596 # 49.875 Gigabytes
                }
        }
        logical_volumes {

                LogVol00 {
                        id = "SWOjo1-qFZZ-CztY-CSXb-zQdX-pwRH-jDNI3o"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 1024     # 32 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 0
                                ]
                        }
                }
                LogVol01 {
                        id = "LoJOLg-5TDC-5ity-l5a6-qLJ5-fuju-oRRzWb"
                        status = ["READ", "WRITE", "VISIBLE"]
                        flags = []
                        segment_count = 1

                        segment1 {
                                start_extent = 0
                                extent_count = 572      # 17.875 Gigabytes

                                type = "striped"
                                stripe_count = 1        # linear

                                stripes = [
                                        "pv0", 1024
                                ]
                        }
                }
        }
}

No comments:

Post a Comment