2020-11-11 09:17:46 -08:00
syntax = "proto3" ;
package storage ;
2022-11-02 15:06:45 +04:00
option go_package = "github.com/siderolabs/talos/pkg/machinery/api/storage" ;
2020-11-11 09:17:46 -08:00
import "common/common.proto" ;
2021-11-23 15:03:38 +00:00
import "google/protobuf/empty.proto" ;
2020-11-11 09:17:46 -08:00
// StorageService represents the storage service.
service StorageService {
rpc Disks ( google.protobuf.Empty ) returns ( DisksResponse ) ;
}
// Disk represents a disk.
message Disk {
// Size indicates the disk size in bytes.
uint64 size = 1 ;
// Model idicates the disk model.
string model = 2 ;
// DeviceName indicates the disk name (e.g. `sda`).
string device_name = 3 ;
2021-03-21 12:05:10 +03:00
// Name as in `/sys/block/<dev>/device/name`.
string name = 4 ;
// Serial as in `/sys/block/<dev>/device/serial`.
string serial = 5 ;
// Modalias as in `/sys/block/<dev>/device/modalias`.
string modalias = 6 ;
// Uuid as in `/sys/block/<dev>/device/uuid`.
string uuid = 7 ;
// Wwid as in `/sys/block/<dev>/device/wwid`.
string wwid = 8 ;
enum DiskType {
UNKNOWN = 0 ;
SSD = 1 ;
HDD = 2 ;
NVME = 3 ;
SD = 4 ;
2024-06-10 16:19:19 +04:00
CD = 5 ;
2021-03-21 12:05:10 +03:00
}
// Type is a type of the disk: nvme, ssd, hdd, sd card.
DiskType type = 9 ;
2022-01-25 09:49:57 +03:00
// BusPath is the bus path of the disk.
string bus_path = 10 ;
2023-02-22 16:44:08 +03:00
// SystemDisk indicates that the disk is used as Talos system disk.
bool system_disk = 11 ;
2023-03-30 18:25:22 +03:00
// Subsystem is the symlink path in the `/sys/block/<dev>/subsystem`.
string subsystem = 12 ;
2023-09-12 17:51:46 +03:00
// Readonly specifies if the disk is read only.
bool readonly = 13 ;
2020-11-11 09:17:46 -08:00
}
// DisksResponse represents the response of the `Disks` RPC.
2021-02-24 20:52:53 +03:00
message Disks {
2020-11-11 09:17:46 -08:00
common.Metadata metadata = 1 ;
repeated Disk disks = 2 ;
}
2021-11-23 15:03:38 +00:00
message DisksResponse {
repeated Disks messages = 1 ;
}