Class: IControl::System::Disk
- Inherits:
-
Base
- Object
- Base
- IControl::System::Disk
- Defined in:
- lib/icontrol/system/disk.rb,
lib/icontrol/system.rb
Overview
The Disk interface enables you to manage the disks in the system. The disk objects come in two flavors. "Physical disks“ are the actual hardware disk drives, which can be anything from a true hard disk to a compact flash drive to a USB flash drive. Physical disks are addressed by their serial numbers. "Logical disks” are the view of the disk drives from the system’s point of view, abstracting the disk itself, making all disk drives look the same whether they are a true hard disk, a flash drive, or a full disk array. In other words, a logical disk can hold one or more physical disks. Logical disks are addressed by the LogicalDisk identifier, which includes their logical name (e.g., "HD2“, "CF1”, "MD1“) and their chassis slot identifier. It is important to note the potentially confusing relationship between logical and physical disks and their identifiers. All physical disks can be addressed by a LogicalDisk identifier, though it is not guaranteed that all physical disks have an entry in the logical disk table. The logical disk identifier for a physical disk is dependent on the connection of the disk drive to the system, so can change if the system’s disk drive configuration changes. On the other hand, all logical disks hold one or more physical disks, which can have a direct one-to-one mapping for a single disk drive or a one-to-many mapping for a disk array. To avoid problems, physical disks should be ideally addressed only by their serial numbers and logical disks only by their LogicalDisk identifiers. Addressing physical disks by their LogicalDisk identifier is supported as a convenience for any user-generated input. Be careful with these distinctions as you use this interface.
Defined Under Namespace
Classes: LogicalDisk, LogicalDiskSequence, LogicalDiskSequenceSequence, RAIDStatus, RAIDStatusSequence
Instance Method Summary collapse
-
#add_array_member(opts) ⇒ Object
Adds physical disk to a set of logical disk arrays.
-
#add_array_member_by_logical_id(opts) ⇒ Object
Adds physical disk to a set of logical disk arrays.
-
#array_member ⇒ String[]
Gets a list of physical disk that are members of a logical disk.
-
#array_status(opts) ⇒ RAIDStatus
Gets RAID disk array statuses for a set of physical disk.
-
#bay_disk_serial_number(opts) ⇒ String
Gets a list of serial numbers of disk installed for a set of disk bays.
-
#is_array_member(opts) ⇒ boolean
Gets states indicating whether a disk is a member of a RAID disk array for a set of physical disk.
-
#is_raid_capable ⇒ boolean
Gets an indication of whether the system is capable of RAID operations.
-
#list ⇒ String
Gets a list of physical disk in the system, identified by serial number.
-
#list_of_bays ⇒ long
Gets a list of disk bays in the system.
-
#list_of_logical_disks ⇒ LogicalDisk
Gets a list of logical disk in the system.
-
#logical_disk_device_name ⇒ String
Gets device names for a set of logical disk.
-
#logical_disk_format ⇒ String
Gets the formats for a set of logical disk.
-
#logical_disk_media ⇒ String
Gets media types for a set of logical disk.
-
#logical_disk_size ⇒ long
Gets sizes (in MiB) for a set of logical disk.
-
#name(opts) ⇒ String
Gets names for a set of physical disk.
-
#remove_array_member(opts) ⇒ Object
Removes phyiscal disk from a set of logical disk arrays.
-
#remove_array_member_by_logical_id(opts) ⇒ Object
Removes physical disk from a set of logical disk arrays.
-
#slot_id(opts) ⇒ long
Gets slot identifiers for a set of physical disk.
-
#version ⇒ String
Gets the version information for this interface.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IControl::Base
Instance Method Details
#add_array_member(opts) ⇒ Object
Adds physical disk to a set of logical disk arrays. For a clustered system, this must be run on the chassis slot holding the disk array. This only works for logical disk which represent disk arrays.
43 44 45 46 |
# File 'lib/icontrol/system/disk.rb', line 43 def add_array_member(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#add_array_member_by_logical_id(opts) ⇒ Object
Adds physical disk to a set of logical disk arrays. For a clustered system, this must be run on the chassis slot holding the disk array. This only works for logical disk which represent disk arrays. This method does exactly the same thing as "add_array_member“, except that the added physical disk are specified by their LogicalDisk identifiers, more convenient for user input than the serial numbers used in "remove_array_member”. It is supplied for convenience purposes only.
61 62 63 64 |
# File 'lib/icontrol/system/disk.rb', line 61 def add_array_member_by_logical_id(opts) opts = check_params(opts,[:names]) super(opts) end |
#array_member ⇒ String[]
Gets a list of physical disk that are members of a logical disk. Note that this can be used for any type of logical disk – single disk drives or disk arrays. However, it may not work for all physical disk logical identifiers.
75 76 77 |
# File 'lib/icontrol/system/disk.rb', line 75 def array_member super end |
#array_status(opts) ⇒ RAIDStatus
Gets RAID disk array statuses for a set of physical disk. Note: RAID status will be RAID_STATUS_UNDEFINED if the disk is not a member of a RAID disk array (see get_physical_disk_is_array_member).
89 90 91 92 |
# File 'lib/icontrol/system/disk.rb', line 89 def array_status(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#bay_disk_serial_number(opts) ⇒ String
Gets a list of serial numbers of disk installed for a set of disk bays.
103 104 105 106 |
# File 'lib/icontrol/system/disk.rb', line 103 def bay_disk_serial_number(opts) opts = check_params(opts,[:ids]) super(opts) end |
#is_array_member(opts) ⇒ boolean
Gets states indicating whether a disk is a member of a RAID disk array for a set of physical disk.
237 238 239 240 |
# File 'lib/icontrol/system/disk.rb', line 237 def is_array_member(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#is_raid_capable ⇒ boolean
Gets an indication of whether the system is capable of RAID operations.
249 250 251 |
# File 'lib/icontrol/system/disk.rb', line 249 def is_raid_capable super end |
#list ⇒ String
Gets a list of physical disk in the system, identified by serial number.
115 116 117 |
# File 'lib/icontrol/system/disk.rb', line 115 def list super end |
#list_of_bays ⇒ long
Gets a list of disk bays in the system.
126 127 128 |
# File 'lib/icontrol/system/disk.rb', line 126 def list_of_bays super end |
#list_of_logical_disks ⇒ LogicalDisk
Gets a list of logical disk in the system.
137 138 139 |
# File 'lib/icontrol/system/disk.rb', line 137 def list_of_logical_disks super end |
#logical_disk_device_name ⇒ String
Gets device names for a set of logical disk. These are names like hda, hdb, etc. (Note: Currently, the strings are for descriptive purposes and are subject to change).
149 150 151 |
# File 'lib/icontrol/system/disk.rb', line 149 def logical_disk_device_name super end |
#logical_disk_format ⇒ String
Gets the formats for a set of logical disk. These are strings like multiboot, lvm, etc. (Note: Currently, the strings are for descriptive purposes and are subject to change).
162 163 164 |
# File 'lib/icontrol/system/disk.rb', line 162 def logical_disk_format super end |
#logical_disk_media ⇒ String
Gets media types for a set of logical disk. These are strings like hd, cf, cft, etc. (Note: Currently, the strings are for descriptive purposes and are subject to change).
174 175 176 |
# File 'lib/icontrol/system/disk.rb', line 174 def logical_disk_media super end |
#logical_disk_size ⇒ long
Gets sizes (in MiB) for a set of logical disk.
185 186 187 |
# File 'lib/icontrol/system/disk.rb', line 185 def logical_disk_size super end |
#name(opts) ⇒ String
Gets names for a set of physical disk. This name is part of the physical disk’s LogicalDisk identifier.
199 200 201 202 |
# File 'lib/icontrol/system/disk.rb', line 199 def name(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#remove_array_member(opts) ⇒ Object
Removes phyiscal disk from a set of logical disk arrays. For a clustered system, this must be run on the chassis slot holding the disk array. This only works for logical disk which represent disk arrays.
263 264 265 266 |
# File 'lib/icontrol/system/disk.rb', line 263 def remove_array_member(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#remove_array_member_by_logical_id(opts) ⇒ Object
Removes physical disk from a set of logical disk arrays. For a clustered system, this must be run on the chassis slot holding the disk array. This only works for logical disk which represent disk arrays. This method does exactly the same thing as "remove_array_member“, except that the removed physical disk are specified by their LogicalDisk identifiers, more convenient for user input than the serial numbers used in "remove_array_member”. It is supplied for convenience purposes only.
282 283 284 285 |
# File 'lib/icontrol/system/disk.rb', line 282 def remove_array_member_by_logical_id(opts) opts = check_params(opts,[:names]) super(opts) end |
#slot_id(opts) ⇒ long
Gets slot identifiers for a set of physical disk. The slot identifier is part of the physical disk’s LogicalDisk identifer.
214 215 216 217 |
# File 'lib/icontrol/system/disk.rb', line 214 def slot_id(opts) opts = check_params(opts,[:serial_numbers]) super(opts) end |
#version ⇒ String
Gets the version information for this interface.
223 224 225 |
# File 'lib/icontrol/system/disk.rb', line 223 def version super end |