[−][src]Struct lsm::Disk
Fields
id: String
Identifier.
name: String
Human friendly name.
disk_type: DiskType
Disk type.
block_size: u64
Block size in bytes.
num_of_blocks: u64
Count of block.
status: u64
Disk status stored in bitmap. Valid status value are:
Disk::STATUS_UNKNOWN
Disk::STATUS_OK
Disk::STATUS_OTHER
Disk::STATUS_PREDICTIVE_FAILURE
Disk::STATUS_ERROR
Disk::STATUS_REMOVED
Disk::STATUS_STARTING
Disk::STATUS_STOPPING
Disk::STATUS_STOPPED
Disk::STATUS_INITIALIZING
Disk::STATUS_MAINTENANCE_MODE
Disk::STATUS_SPARE_DISK
Disk::STATUS_RECONSTRUCT
Disk::STATUS_FREE
if (d.status & Disk::STATUS_OK) == 0 { println!("Disk {}/{} is not healthy", d.name, d.id); }
system_id: String
Identifier of owner system.
location: Option<String>
Disk location in storage topology.
rpm: Option<i32>
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).
link_type: Option<DiskLinkType>
Disk data link type.
vpd83: Option<String>
SCSI VPD 0x83 NAA type identifier.
Udev treat it as ID_WWN_WITH_EXTENSION
Methods
impl Disk
[src]
pub const STATUS_UNKNOWN: u64
[src]
Plugin failed to query out the status of disk.
pub const STATUS_OK: u64
[src]
Disk is up and healthy.
pub const STATUS_OTHER: u64
[src]
Vendor specific status.
pub const STATUS_PREDICTIVE_FAILURE: u64
[src]
Disk is still functional but will fail soon.
pub const STATUS_ERROR: u64
[src]
Error make disk not functional.
pub const STATUS_REMOVED: u64
[src]
Disk was removed by administrator.
pub const STATUS_STARTING: u64
[src]
Disk is starting up.
pub const STATUS_STOPPING: u64
[src]
Disk is shutting down.
pub const STATUS_STOPPED: u64
[src]
Disk is stopped by administrator.
pub const STATUS_INITIALIZING: u64
[src]
Disk is not functional yet, internal storage system is initializing this disk, it could be:
-
Initialising new disk.
-
Zeroing disk.
-
Scrubbing disk data.
pub const STATUS_MAINTENANCE_MODE: u64
[src]
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.
pub const STATUS_SPARE_DISK: u64
[src]
Disk is configured as spare disk.
pub const STATUS_RECONSTRUCT: u64
[src]
Disk is reconstructing its data.
pub const STATUS_FREE: u64
[src]
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 Clone for Disk
[src]
impl Debug for Disk
[src]
impl<'de> Deserialize<'de> for Disk
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Disk
[src]
Auto Trait Implementations
impl RefUnwindSafe for Disk
impl Send for Disk
impl Sync for Disk
impl Unpin for Disk
impl UnwindSafe for Disk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,