Replica Directory Layout
The replica directory contains the raw data and metadata for a volume replica on the host’s local filesystem. By default, these are located at /var/lib/longhorn/replicas/.
Each replica is stored in a directory named using the format: <pvc-name>-<random-id>.
Example: pvc-b43f2832-33ef-4ff1-ac7e-b097f71a5977-6f2d4c29
volume.metaThe “Source of Truth” for the replica’s state. It is a JSON file that defines the volume’s operational parameters.
.img file receiving writes.2097152 for 2MiB or 16777216 for 16MiB).revision.counterA critical metadata file used for data consistency. It contains a single integer that increments with every write operation. When a replica starts, Longhorn compares the revision.counter across all replicas; the one with the highest number is considered the most up-to-date.
volume-head-###.imgA sparse file representing the “live” data layer.
volume-snap-<name>.imgRead-only binary files created during a snapshot.
.img file becomes immutable..img.meta)Every .img file has a corresponding .img.meta JSON file.
Longhorn employs a “Top-Down” lookup strategy:
volume-head.Parent link in the .img.meta to the previous snapshot.If a replica fails with an “invalid chain” error, administrators can inspect the Parent fields in the .img.meta files to ensure they form an unbroken sequence pointing to existing files on the disk.
© 2019-2026 Longhorn Authors | Documentation Distributed under CC-BY-4.0
© 2026 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.