{
  "slug": "thin-pool-metadata",
  "term": "Thin-pool metadata",
  "aliases": [
    "LVM thin-pool metadata"
  ],
  "definition": "The dm-thin mapping and allocation information stored in a separate logical metadata device to track how thin volumes use a pool's data blocks.",
  "note": "The active LVM component has a _tmeta suffix. It is distinct from volume-group configuration metadata. A _pmspare is used as repair output, not active free metadata capacity or a current backup. [lvmthin] Linux v6.12 distinguishes metadata-space mode from failed metadata operations; inspect needs_check and logs, not just Meta% or ro. [dm-thin-source]\n\nvgcfgbackup omits these mappings. A reserve_metadata_snap inspection view is not a thin-volume data snapshot, and exporting mappings does not copy payload blocks. thin_dump 0.9.0 requires metadata-snapshot mode when reading live metadata. [lvmthin] [dm-thin-doc] [thin-dump]\n\nData blocks are 128 to 2097152 sectors of 512 bytes, equivalent to 64 KiB to 1 GiB, in multiples of 64 KiB. The guide estimates metadata bytes as 48 times data-device bytes divided by data-block bytes; sharing and snapshot changes affect the requirement. This is sizing guidance, not a guaranteed reservation. The Linux v6.12 guide documents metadata commits on FLUSH/FUA and every second otherwise; this cadence is not an application persistence deadline. [dm-thin-doc]\n\nIn Linux v6.12, the metadata allocation-map cap is 17,045,913,600 bytes (about 15.875 GiB). It is smaller than the separate 16 GiB warning threshold; a larger metadata device does not make its excess space usable. These are versioned implementation limits, not an observed pool size. [dm-thin-source] [dm-thin-limits] [dm-metadata-map]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Metadata can sit on a mirrored or faster device, so its resilience and performance can be chosen independently of the data device.",
      "citationIds": [
        "dm-thin-doc"
      ]
    }
  ],
  "limitations": [
    {
      "text": "A repaired mapping structure does not by itself verify filesystem or application consistency.",
      "citationIds": [
        "lvmthin"
      ]
    },
    {
      "text": "In Linux v6.12, metadata-space mode alone does not establish that repair is required. A failed metadata operation attempts rollback and sets needs_check; failure of those recovery steps forces fail mode.",
      "citationIds": [
        "dm-thin-source"
      ]
    }
  ],
  "related": [
    "thin-pool",
    "thin-provisioning",
    "lvm",
    "snapshot",
    "snapshot-exception-store"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "lvmthin",
      "title": "LVM2 lvmthin(7): pool components, usage counters and metadata repair",
      "url": "https://man7.org/linux/man-pages/man7/lvmthin.7.html",
      "accessed": "2026-10-23"
    },
    {
      "id": "dm-thin-source",
      "title": "Linux v6.12: dm-thin.c, pool modes, timeout, failed metadata operations and resize",
      "url": "https://github.com/torvalds/linux/blob/v6.12/drivers/md/dm-thin.c",
      "accessed": "2026-10-31"
    },
    {
      "id": "hesela-allocation",
      "title": "Hesela: Sparse files, preallocation and thin-pool capacity",
      "url": "https://hesela.com/analyses/sparse-files-preallocation-thin-capacity/",
      "accessed": "2026-10-17"
    },
    {
      "id": "dm-thin-doc",
      "title": "Linux v6.12 dm-thin guide: sizing, commits, create_snap and reserve_metadata_snap",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.12/Documentation/admin-guide/device-mapper/thin-provisioning.rst",
      "accessed": "2026-10-31"
    },
    {
      "id": "thin-dump",
      "title": "thin-provisioning-tools 0.9.0: thin_dump(8), live-metadata restrictions and output formats",
      "url": "https://manpages.debian.org/bookworm/thin-provisioning-tools/thin_dump.8.en.html",
      "accessed": "2026-10-17"
    },
    {
      "id": "dm-thin-limits",
      "title": "Linux v6.12 dm-thin-metadata.h: metadata-map cap alias and separate 16 GiB warning threshold",
      "url": "https://github.com/torvalds/linux/blob/v6.12/drivers/md/dm-thin-metadata.h",
      "accessed": "2026-10-31"
    },
    {
      "id": "dm-metadata-map",
      "title": "Linux v6.12 dm-space-map-metadata.h: 255 index entries, bitmap geometry and 4096-byte metadata blocks",
      "url": "https://github.com/torvalds/linux/blob/v6.12/drivers/md/persistent-data/dm-space-map-metadata.h",
      "accessed": "2026-10-31"
    }
  ],
  "updated": "2026-10-31",
  "provenance": [
    "The Linux v6.12 guide supplies sector counts, the sizing heuristic and commit behavior. Sector counts are converted here to explicit binary units; its rounded size headline is not treated as an exact implementation cap. [dm-thin-doc]",
    "lvmthin is the lvmthin(7) manual, re-read for _tmeta, _pmspare, the vgcfgbackup note and the 2 MiB to about 16 GiB metadata LV range.",
    "The copy-on-write entry links here because thin snapshots share data blocks and this metadata records the sharing, so snapshot-heavy pools need more of it.",
    "Source-derived arithmetic: 255 * (16384 - 64) * 4096 = 17,045,913,600 bytes; the separate warning threshold is 16 * 1024^3 = 17,179,869,184 bytes. get_metadata_dev_size() clamps to the former. No live pool was created or resized. [dm-metadata-map] [dm-thin-limits] [dm-thin-source]",
    "The v6.12 guide groups exhaustion and failed operations; the code separates check_for_metadata_space() from metadata_operation_failed(). Growth can restore write mode when needs_check is absent. This is not every distribution's recovery procedure. [dm-thin-doc] [dm-thin-source]"
  ]
}
