Protocol Documentation

September 9, 2025 · View on GitHub

Table of Contents

Top

pkg/lvmd/proto/lvmd.proto

LVMd manages logical volumes of an LVM volume group.

The protocol consists of two services:

  • VGService provides information of the volume group.
  • LVService provides management functions for logical volumes on the volume group.

CreateLVRequest

Represents the input for CreateLV.

FieldTypeLabelDescription
namestringThe logical volume name.
tagsstringrepeatedTags to add to the volume during creation
device_classstring
lvcreate_option_classstring
size_bytesint64Volume size in canonical CSI bytes.

CreateLVResponse

Represents the response of CreateLV.

FieldTypeLabelDescription
volumeLogicalVolumeInformation of the created volume.

CreateLVSnapshotRequest

FieldTypeLabelDescription
namestringThe logical volume name.
tagsstringrepeatedTags to add to the volume during creation
device_classstring
source_volumestringSource lv of snapshot.
access_typestringAccess type of snapshot
size_bytesint64Volume size in canonical CSI bytes.

CreateLVSnapshotResponse

FieldTypeLabelDescription
snapshotLogicalVolumeInformation of the created snapshot lv.

Empty

GetFreeBytesRequest

FieldTypeLabelDescription
device_classstring

GetFreeBytesResponse

Represents the response of GetFreeBytes.

FieldTypeLabelDescription
free_bytesuint64Free space of the volume group in bytes.

GetLVListRequest

FieldTypeLabelDescription
device_classstring

GetLVListResponse

Represents the response of GetLVList.

FieldTypeLabelDescription
volumesLogicalVolumerepeatedInformation of volumes.

LogicalVolume

Represents a logical volume.

FieldTypeLabelDescription
namestringThe logical volume name.
dev_majoruint32Device major number.
dev_minoruint32Device minor number.
tagsstringrepeatedTags to add to the volume during creation
size_bytesint64Volume size in canonical CSI bytes.
pathstringPath to the lv as per lvm.
attrstringAttributes of the lv.

RemoveLVRequest

Represents the input for RemoveLV.

FieldTypeLabelDescription
namestringThe logical volume name.
device_classstring

ResizeLVRequest

Represents the input for ResizeLV.

The volume must already exist. The volume size will be expanded to at least "size_bytes".

FieldTypeLabelDescription
namestringThe logical volume name.
size_bytesint64Volume size in canonical CSI bytes.
device_classstring

ResizeLVResponse

FieldTypeLabelDescription
size_bytesint64Volume size in canonical CSI bytes.

ThinPoolItem

Represents the details of thinpool.

FieldTypeLabelDescription
data_percentdoubleData percent occupied on the thinpool, used for monitoring.
metadata_percentdoubleMetadata percent occupied on the thinpool, used for monitoring.
overprovision_bytesuint64Free space on the thinpool with overprovision, used for annotating node.
size_bytesuint64Physical data space size of the thinpool.

WatchItem

Represents the response corresponding to device class targets.

FieldTypeLabelDescription
free_bytesuint64Free space in the volume group in bytes.
device_classstring
size_bytesuint64Size of volume group in bytes.
thin_poolThinPoolItem

WatchResponse

Represents the stream output from Watch.

FieldTypeLabelDescription
free_bytesuint64Free space of the default volume group in bytes. In the case of thin pools, free space on the thinpool with overprovision in bytes.
itemsWatchItemrepeated

LVService

Service to manage logical volumes of the volume group.

Method NameRequest TypeResponse TypeDescription
CreateLVCreateLVRequestCreateLVResponseCreate a logical volume.
RemoveLVRemoveLVRequestEmptyRemove a logical volume.
ResizeLVResizeLVRequestResizeLVResponseResize a logical volume.
CreateLVSnapshotCreateLVSnapshotRequestCreateLVSnapshotResponse

VGService

Service to retrieve information of the volume group.

Method NameRequest TypeResponse TypeDescription
GetLVListGetLVListRequestGetLVListResponseGet the list of logical volumes in the volume group.
GetFreeBytesGetFreeBytesRequestGetFreeBytesResponseGet the free space of the volume group in bytes.
WatchEmptyWatchResponse streamStream the volume group metrics.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2282^{28}.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2562^{56}.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)