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)
-
- (Object) add_array_member(opts)
Adds physical disk to a set of logical disk arrays.
-
- (Object) add_array_member_by_logical_id(opts)
Adds physical disk to a set of logical disk arrays.
-
- (String[]) array_member
Gets a list of physical disk that are members of a logical disk.
-
- (RAIDStatus) array_status(opts)
Gets RAID disk array statuses for a set of physical disk.
-
- (String) bay_disk_serial_number(opts)
Gets a list of serial numbers of disk installed for a set of disk bays.
-
- (boolean) is_array_member(opts)
Gets states indicating whether a disk is a member of a RAID disk array for a set of physical disk.
-
- (boolean) is_raid_capable
Gets an indication of whether the system is capable of RAID operations.
-
- (String) list
Gets a list of physical disk in the system, identified by serial number.
-
- (long) list_of_bays
Gets a list of disk bays in the system.
-
- (LogicalDisk) list_of_logical_disks
Gets a list of logical disk in the system.
-
- (String) logical_disk_device_name
Gets device names for a set of logical disk.
-
- (String) logical_disk_format
Gets the formats for a set of logical disk.
-
- (String) logical_disk_media
Gets media types for a set of logical disk.
-
- (long) logical_disk_size
Gets sizes (in MiB) for a set of logical disk.
-
- (String) name(opts)
Gets names for a set of physical disk.
-
- (Object) remove_array_member(opts)
Removes phyiscal disk from a set of logical disk arrays.
-
- (Object) remove_array_member_by_logical_id(opts)
Removes physical disk from a set of logical disk arrays.
-
- (long) slot_id(opts)
Gets slot identifiers for a set of physical disk.
-
- (String) version
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
- (Object) add_array_member(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (Object) add_array_member_by_logical_id(opts)
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) check_params(opts,[:names]) super end |
- (String[]) array_member
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 |
- (RAIDStatus) array_status(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (String) bay_disk_serial_number(opts)
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) check_params(opts,[:ids]) super end |
- (boolean) is_array_member(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (boolean) is_raid_capable
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 |
- (String) list
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 |
- (long) list_of_bays
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 |
- (LogicalDisk) list_of_logical_disks
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 |
- (String) logical_disk_device_name
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 |
- (String) logical_disk_format
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 |
- (String) logical_disk_media
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 |
- (long) logical_disk_size
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 |
- (String) name(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (Object) remove_array_member(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (Object) remove_array_member_by_logical_id(opts)
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) check_params(opts,[:names]) super end |
- (long) slot_id(opts)
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) check_params(opts,[:serial_numbers]) super end |
- (String) version
Gets the version information for this interface.
223 224 225 |
# File 'lib/icontrol/system/disk.rb', line 223 def version super end |