class

Cl8r::Model::DiskSpec

Inherits JSON::Serializable < YAML::Serializable < Reference < Object

Models physical and virtual storage drive allocations for nodes. Supports OS boot isolation, software RAID1 mirrors, and dedicated Ceph OSD drives.

Constructors

new(device : String = "", role : String = "os_boot", size_gb : Int32 | Nil = nil, wipe_on_install : Bool = false, pool : String | Nil = nil, format : String | Nil = nil, media : String | Nil = nil, rotational : Bool = false, bay : Int32 | Nil = nil, serial : String | Nil = nil, model : String | Nil = nil, vendor : String | Nil = nil, wwn : String | Nil = nil, status : String = "active", led : String = "off", slot_type : String | Nil = nil, bus : String | Nil = nil, node : String | Nil = nil, rack : String | Nil = nil, rack_unit : Int32 | Nil = nil)

Initializes a DiskSpec with device path, role, hardware identity, and physical bay coordinates.

Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

bay=(bay : Int32 | Nil)
Source
bus=(bus : String | Nil)
Source
device
Source
device=(device : String)
Source
format
Source
format=(format : String | Nil)
Source
led=(led : String)
Source
locate_command

Returns the CLI command to trigger the physical chassis drive locator LED.

Source
lsblk_command

Returns the CLI command to inspect block device layout and topology.

Source
media
Source
media=(media : String | Nil)
Source
model
Source
model=(model : String | Nil)
Source
node
Source
node=(node : String | Nil)
Source
persistent_id

Generates a persistent /dev/disk/by-id/ symlink path based on serial and model.

Source
pool
Source
pool=(pool : String | Nil)
Source
rack
Source
rack=(rack : String | Nil)
Source
rack_unit
Source
rack_unit=(rack_unit : Int32 | Nil)
Source
resolved_media

Returns the resolved physical media technology for this disk.

Source
role
Source
role=(role : String)
Source
rotational=(rotational : Bool)
Source
rotational?
Source
serial
Source
serial=(serial : String | Nil)
Source
size_gb
Source
size_gb=(size_gb : Int32 | Nil)
Source
slot_type
Source
slot_type=(slot_type : String | Nil)
Source
smart_command

Returns the CLI command to run comprehensive SMART health diagnostic.

Source
status
Source
status=(status : String)
Source
stop_locate_command

Returns the CLI command to deactivate the physical chassis drive locator LED.

Source
vendor
Source
vendor=(vendor : String | Nil)
Source
wipe_command

Returns the CLI command to safely wipe or discard the drive before retirement.

Source
wipe_on_install=(wipe_on_install : Bool)
Source
wipe_on_install?
Source
wwn=(wwn : String | Nil)
Source