Struct lsm::Disk [] [src]

pub struct Disk {
    pub id: String,
    pub name: String,
    pub disk_type: DiskType,
    pub block_size: u64,
    pub num_of_blocks: u64,
    pub status: u64,
    pub system_id: String,
    pub location: Option<String>,
    pub rpm: Option<i32>,
    pub link_type: Option<DiskLinkType>,
    pub vpd83: Option<String>,
    // some fields omitted
}

Fields

Identifier.

Human friendly name.

Disk type.

Block size in bytes.

Count of block.

Identifier of owner system.

Disk location in storage topology.

Disk rotation speed - revolutions per minute(RPM):

  • -1 -- Unknown RPM speed.

  • 0 -- Non-rotating medium (e.g., SSD).

  • 1 -- Rotational disk with unknown speed.

  • > 1 -- Normal rotational disk (e.g., HDD).

Disk data link type.

SCSI VPD 0x83 NAA type identifier. Udev treat it as ID_WWN_WITH_EXTENSION

Methods

impl Disk
[src]

STATUS_UNKNOWN: u64 = 1

Plugin failed to query out the status of disk.

STATUS_OK: u64 = 1 << 1

Disk is up and healthy.

STATUS_OTHER: u64 = 1 << 2

Vendor specific status.

STATUS_PREDICTIVE_FAILURE: u64 = 1 << 3

Disk is still functional but will fail soon.

STATUS_ERROR: u64 = 1 << 4

Error make disk not functional.

STATUS_REMOVED: u64 = 1 << 5

Disk was removed by administrator.

STATUS_STARTING: u64 = 1 << 6

Disk is starting up.

STATUS_STOPPING: u64 = 1 << 7

Disk is shutting down.

STATUS_STOPPED: u64 = 1 << 8

Disk is stopped by administrator.

STATUS_INITIALIZING: u64 = 1 << 9

Disk is not functional yet, internal storage system is initializing this disk, it could be:

  • Initialising new disk.

  • Zeroing disk.

  • Scrubbing disk data.

STATUS_MAINTENANCE_MODE: u64 = 1 << 10

In maintenance for bad sector scan, integrity check and etc It might be combined with Disk::STATUS_OK or Disk::STATUS_STOPPED for online maintenance or offline maintenance.

STATUS_SPARE_DISK: u64 = 1 << 11

Disk is configured as spare disk.

STATUS_RECONSTRUCT: u64 = 1 << 12

Disk is reconstructing its data.

STATUS_FREE: u64 = 1 << 13

Indicate the whole disk is not holding any data or acting as a dedicate spare disk. This disk could be assigned as a dedicated spare disk or used for creating pool. If any spare disk(like those on NetApp ONTAP) does not require any explicit action when assigning to pool, it should be treated as free disk and marked as Disk::STATUS_FREE | Disk::STATUS_SPARE_DISK.

Trait Implementations

impl Debug for Disk
[src]

[src]

Formats the value using the given formatter.

impl Clone for Disk
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more