Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions api/resource/definitions/block/block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,40 @@ message FilesystemSpec {
string label = 2;
}

// LVMLogicalVolumeSpec describes an LVM Logical Volume.
message LVMLogicalVolumeSpec {
string name = 1;
string volume_group_name = 2;
uint64 size = 3;
talos.resource.definitions.enums.BlockLVType type = 4;
string uuid = 7;
string device_path = 8;
string symlink = 9;
string state = 10;
}

// LVMPhysicalVolumeSpec describes an LVM Physical Volume.
message LVMPhysicalVolumeSpec {
string device_path = 1;
string volume_group_name = 2;
uint64 size = 3;
string uuid = 4;
uint64 allocated_extents = 5;
uint64 total_extents = 6;
}

// LVMVolumeGroupSpec describes an LVM Volume Group.
message LVMVolumeGroupSpec {
string name = 1;
repeated string physical_volumes = 2;
uint64 total_size = 3;
uint64 free_size = 4;
string uuid = 5;
uint64 extent_size = 6;
uint32 logical_volumes_count = 7;
uint32 physical_volumes_count = 8;
}

// LocatorSpec is the spec for volume locator.
message LocatorSpec {
google.api.expr.v1alpha1.CheckedExpr match = 1;
Expand Down
8 changes: 8 additions & 0 deletions api/resource/definitions/enums/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,11 @@ enum BlockFSParameterType {
FS_PARAMETER_TYPE_BINARY_VALUE = 2;
}

// BlockLVType describes the type of logical volume.
enum BlockLVType {
LV_TYPE_LINEAR = 0;
}

// BlockVolumePhase describes volume phase.
enum BlockVolumePhase {
VOLUME_PHASE_WAITING = 0;
Expand All @@ -736,6 +741,9 @@ enum BlockVolumeType {
VOLUME_TYPE_SYMLINK = 4;
VOLUME_TYPE_OVERLAY = 5;
VOLUME_TYPE_EXTERNAL = 6;
LVM_VOLUME_TYPE_PHYSICAL_VOLUME = 7;
LVM_VOLUME_TYPE_VOLUME_GROUP = 8;
LVM_VOLUME_TYPE_LOGICAL_VOLUME = 9;
}

// CriImageCacheStatus describes image cache status type.
Expand Down
3 changes: 3 additions & 0 deletions internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ func NewState() (*State, error) {
&block.DiscoveryRefreshRequest{},
&block.DiscoveryRefreshStatus{},
&block.Disk{},
&block.LVMLogicalVolume{},
&block.MountRequest{},
&block.MountStatus{},
&block.LVMPhysicalVolume{},
&block.SwapStatus{},
&block.Symlink{},
&block.SystemDisk{},
&block.UserDiskConfigStatus{},
&block.VolumeConfig{},
&block.LVMVolumeGroup{},
&block.VolumeLifecycle{},
&block.VolumeMountRequest{},
&block.VolumeMountStatus{},
Expand Down
Loading