Documentation
¶
Overview ¶
Package lvm2 reads LVM2 physical volumes (and the volume groups on them) directly from a block device or disk image, without the LVM tooling. It parses the PV label and the text-format volume-group metadata to expose each logical volume as a byte range so a filesystem reader can extract it.
Only the common single-PV case is supported: linear or single-stripe logical volumes whose physical extents all live on the one PV being read. Striped, mirrored and RAID logical volumes spanning multiple PVs are reported but not mapped to a contiguous range.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotLVM = errors.New("not an LVM2 physical volume")
ErrNotLVM is returned when the region does not hold an LVM2 physical volume.
Functions ¶
This section is empty.
Types ¶
type Extent ¶
Extent is one physical byte range of a logical volume, relative to the start of the physical volume (the partition holding the PV).
type LogicalVolume ¶
LogicalVolume is a single logical volume mapped onto the physical volume that was read. Extents are ordered by offset and non-overlapping. An empty Extents slice means the volume could not be mapped (mirror/RAID/multi-PV).