dissect.target.volumes.lvm#

Module Contents#

Classes#

LvmVolumeSystem

An extension of the VolumeSystem class that provides additional functionality for dealing with

class dissect.target.volumes.lvm.LvmVolumeSystem(fh: Union[BinaryIO, list[BinaryIO]], *args, **kwargs)#

Bases: dissect.target.volume.LogicalVolumeSystem

An extension of the VolumeSystem class that provides additional functionality for dealing with logical volume systems.

classmethod open_all(volumes: list[BinaryIO]) Iterator[dissect.target.volume.LogicalVolumeSystem]#

Open all the discovered logical volume systems from the given file-like objects.

There can be more than one logical volume system on a given set of file-like objects. For example, you can have five disks or volumes with two separate LVM2 volume groups. This function is responsible for grouping the correct disks and volumes with each other, and correctly opening each distinct logical volume system.

Parameters:

volumes – A list of file-like objects to discover and open the logical volume systems on.

Returns:

An iterator of LogicalVolumeSystem.

static detect(fh: BinaryIO) bool#

Detects whether this VolumeSystem class can be opened on the given file-like object.

Returns:

True or False if the VolumeSystem can be opened from this file-like object.

static detect_volume(fh: BinaryIO) bool#

Determine whether the given file-like object belongs to this logical volume system.

Parameters:

fh – A file-like object that may be part of the logical volume system.

Returns:

True if the given file-like object is part of the logical volume system, False otherwise.