Skip to content

Commit

Permalink
feat(apis): add block size and drive type fields
Browse files Browse the repository at this point in the history
add logical/physical block size, hardware sector size and drive type
fields into the blockdevice spec.details

Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
  • Loading branch information
akhilerm authored and kmova committed Mar 19, 2020
1 parent acd4b7a commit a00c2bb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pkg/apis/openebs/v1alpha1/blockdevice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,24 @@ type DeviceCapacity struct {

// DeviceDetails represent certain hardware/static attributes of the block device
type DeviceDetails struct {
// DeviceType represents the type of drive like SSD, HDD etc.,
// DeviceType represents the type of device like
// sparse, disk, partition, lvm, raid
DeviceType string `json:"deviceType"`

// DriveType is the type of backing drive, HDD/SSD
DriveType string `json:"driveType"`

// LogicalBlockSize is the logical block size in bytes
// reported by /sys/class/block/sda/queue/logical_block_size
LogicalBlockSize uint32 `json:"logicalBlockSize"`

// PhysicalBlockSize is the physical block size in bytes
// reported by /sys/class/block/sda/queue/physical_block_size
PhysicalBlockSize uint32 `json:"physicalBlockSize"`

// HardwareSectorSize is the hardware sector size in bytes
HardwareSectorSize uint32 `json:"hardwareSectorSize"`

// Model is model of disk
Model string `json:"model"`

Expand Down

0 comments on commit a00c2bb

Please sign in to comment.