Struct lsm::Pool
[−]
[src]
pub struct Pool { pub id: String, pub name: String, pub element_type: u64, pub unsupported_actions: u64, pub total_space: u64, pub free_space: u64, pub status: u64, pub status_info: Option<String>, pub system_id: String, // some fields omitted }
Fields
id: String
Identifier.
name: String
Human friendly name.
element_type: u64
The type of elements this pool could create. Valid element types are:
Pool::ELEMENT_TYPE_POOL
Pool::ELEMENT_TYPE_VOLUME
Pool::ELEMENT_TYPE_FS
Pool::ELEMENT_TYPE_DELTA
Pool::ELEMENT_TYPE_VOLUME_FULL
Pool::ELEMENT_TYPE_VOLUME_THIN
Pool::ELEMENT_TYPE_SYS_RESERVED
The values are stored in bitmap:
if (p.element_type & Pool::ELEMENT_TYPE_VOLUME) == 0 { println!("Pool {}/{} could create volume", p.name, p.id); }
unsupported_actions: u64
The actions does not supported by this pool. Valid values are:
The values are stored in bitmap:
if (p.unsupported_actions & Pool::UNSUPPORTED_VOLUME_GROW) == 0 { println!("Pool {}/{} cannot grow size of volume", p.name, p.id); }
total_space: u64
Total space in bytes.
free_space: u64
Free space in bytes.
status: u64
Pool status stored in bitmap. Valid status value are:
Pool::STATUS_UNKNOWN
Pool::STATUS_OK
Pool::STATUS_OTHER
Pool::STATUS_DEGRADED
Pool::STATUS_ERROR
Pool::STATUS_STOPPED
Pool::STATUS_STARTING
Pool::STATUS_RECONSTRUCTING
Pool::STATUS_VERIFYING
Pool::STATUS_INITIALIZING
Pool::STATUS_GROWING
if (p.status & Pool::STATUS_OK) == 0 { println!("Pool {}/{} is not healthy", p.name, p.id); }
status_info: Option<String>
Additional message for status.
system_id: String
Identifier of owner system.
Methods
impl Pool
[src]
const ELEMENT_TYPE_POOL: u64
ELEMENT_TYPE_POOL: u64 = 1 << 1
This pool could allocate space for sub-pool.
const ELEMENT_TYPE_VOLUME: u64
ELEMENT_TYPE_VOLUME: u64 = 1 << 2
This pool could create volume.
const ELEMENT_TYPE_FS: u64
ELEMENT_TYPE_FS: u64 = 1 << 3
This pool could create file system.
const ELEMENT_TYPE_DELTA: u64
ELEMENT_TYPE_DELTA: u64 = 1 << 4
This pool could hold delta data for snapshots.
const ELEMENT_TYPE_VOLUME_FULL: u64
ELEMENT_TYPE_VOLUME_FULL: u64 = 1 << 5
This pool could create fully allocated volume.
const ELEMENT_TYPE_VOLUME_THIN: u64
ELEMENT_TYPE_VOLUME_THIN: u64 = 1 << 6
This pool could create thin provisioned volume.
const ELEMENT_TYPE_SYS_RESERVED: u64
ELEMENT_TYPE_SYS_RESERVED: u64 = 1 << 10
This pool is reserved for system internal use.
const UNSUPPORTED_VOLUME_GROW: u64
UNSUPPORTED_VOLUME_GROW: u64 = 1
This pool cannot grow size of its volume.
const UNSUPPORTED_VOLUME_SHRINK: u64
UNSUPPORTED_VOLUME_SHRINK: u64 = 1 << 1
This pool cannot shrink size of its volume.
const STATUS_UNKNOWN: u64
STATUS_UNKNOWN: u64 = 1
Plugin failed to query pool status.
const STATUS_OK: u64
STATUS_OK: u64 = 1 << 1
The data of this pool is accessible with not data lose. But it might
along with Pool::STATUS_DEGRADED
to indicate redundancy lose.
const STATUS_OTHER: u64
STATUS_OTHER: u64 = 1 << 2
Vendor specific status. The Pool.status_info
property will explain
the detail.
const STATUS_DEGRADED: u64
STATUS_DEGRADED: u64 = 1 << 4
Pool is lost data redundancy due to I/O error or offline of one or more
RAID member. Often come with Pool::STATUS_OK
to indicate data is
still accessible with not data lose. Example:
RAID 6 pool lost access to 1 disk or 2 disks.
RAID 5 pool lost access to 1 disk.
const STATUS_ERROR: u64
STATUS_ERROR: u64 = 1 << 5
Pool data is not accessible due to some members offline. Example:
RAID 5 pool lost access to 2 disks.
RAID 0 pool lost access to 1 disks.
const STATUS_STOPPED: u64
STATUS_STOPPED: u64 = 1 << 9
Pool is stopping by administrator. Pool data is not accessible.
const STATUS_STARTING: u64
STATUS_STARTING: u64 = 1 << 10
Pool is reviving from STOPPED status. Pool data is not accessible yet.
const STATUS_RECONSTRUCTING: u64
STATUS_RECONSTRUCTING: u64 = 1 << 12
Pool is reconstructing the hash data or mirror data. Mostly happen
when disk revive from offline or disk replaced. Pool.status_info
may
contain progress of this reconstruction job. Often come with
Pool::STATUS_DEGRADED
and Pool::STATUS_OK
.
const STATUS_VERIFYING: u64
STATUS_VERIFYING: u64 = 1 << 13
Array is running integrity check on data of current pool. It might be
started by administrator or array itself. The I/O performance will be
impacted. Pool.status_info may contain progress of this verification
job. Often come with Pool::STATUS_OK
to indicate data is still
accessible.
const STATUS_INITIALIZING: u64
STATUS_INITIALIZING: u64 = 1 << 14
Pool is not accessable and performing initializing task. Often happen on newly created pool.
const STATUS_GROWING: u64
STATUS_GROWING: u64 = 1 << 15
Pool is growing its size and doing internal jobs. Pool.status_info
can contain progress of this growing job. Often come with
Pool::STATUS_OK
to indicate data is still accessible.