IBM::StorageSystem::VDisk - Class for operations with IBM StorageSystem VDisks
Version 0.01
use IBM::StorageSystem; my $ibm = IBM::StorageSystem->new( user => 'admin', host => 'my-v7000', key_path => '/path/to/my/.ssh/private_key' ) or die "Couldn't create object! $!\n"; # Get the VDisk ID 3 and print the VDisk UUID my $vdisk = $ibm->vdisk(3); print $vdisk->vdisk_UUID; # Alternately: print $ibm->vdisk(3)->vdisk_UUID; # Print the name, ID, capacity in GB and MDisk group name of all VDisks in a # nicely formatted output printf( "%-20s%-8s%-15s%20s\n", 'Name', 'ID', 'Capacity (GB)', 'MDisk Group Name' ); printf( "%-20s%-8s%-15s%20s\n", '-'x18, '-'x4, '-'x12, '-'x15 ); map { printf( "%-20s%-8s%-15s%20s\n", $_->name, $_->id, (int($_->capacity / (1024**3))), $_->mdisk_grp_name) } grep { $_->status eq 'online' } $ibm->get_vdisks; # Should print something like: # Name ID Capacity (GB) MDisk Group Name # ------------------ ---- ------------ --------------- # file-host-1 0 5823 FILE_POOL # backup-host-2 1 2330 BACKUP_POOL # ... etc.
Specifies the ID of the FlashCopy mapping that the volume belongs to. The value many indicates that the volume belongs to more than one FlashCopy mapping.
Specifies the name of the FlashCopy mapping that the volume belongs to. The value many indicates that the volume belongs to more than one FlashCopy mapping.
Specifies the I/O Group that the volume belongs to.
Specifies if a volume is a change volume of a Global Mirror or Metro Mirror relationship.
Specifies the ID of the Global Mirror or Metro Mirror relationship that the volume belongs to. The value must be numerical.
Specifies the name of the Global Mirror or Metro Mirror relationship that the volume belongs to.
Specifies the cache mode of the volume. The value can be readwrite or <none>.
Specifies the total capacity of the volume.
# Get copy ID 0 of VDisk 0 and print the copy status my $copy = $ibm->vdisk(0)->copy(0); print $copy->status; # Or: print $ibm->vdisk(0)->copy(0)->status;
Returns the VDisk volume copy specified by the value of the numerical ID argument as an IBM::StorageSystem::VDisk::Copy object.
Note that this method implements caching and will return a cached IBM::StorageSystem::VDisk::Copy object should one exist from a previous retrieval.
Note also that previous retrievals of such objects may happen implicitly on invocation of the copy, get_copy, or get_copys methods so if you are certain that you wish to force any existing cached objects to be refreshed, then you should use the get_copy or get_copys methods.
Note that this method is non-caching and will always force a retrieval of fresh information from the StorageSystem.
Doing so will usually result in a performance penalty - compare this with the operation of the caching method copy.
my @vdisks = $ibm->get_vdisks; foreach my $vdisk ( @vdisks ) { my @copies = $vdisk->get_copys; foreach my $copy ( @copies ) { print $copy->sync } }
Returns all VDisk copies for the specified VDisk as an array of IBM::StorageSystem::VDisk::Copy objects.
Note that this method is non-caching and the information is always retrieved from the target system ignoring any cached results.
Returns the copy count of the volume.
Specifies the cache state for the volume. The value can be empty, not_empty, corrupt, or repairing. A cache state of corrupt indicates that the volume requires recovery by using one of the recovervdisk commands. A cache state of repairing indicates that repairs initiated by a recovervdisk command are in progress.
Specifies the number of FlashCopy mappings that the volume belongs to.
Expressed as a value string (long object name with a maximum of 63 characters), specifies the full name for file system which owns this volume; otherwise, it is blank.
Indicates whether the volume was formatted when it was created. The value can be yes or no.
Specifies the difference between the real_capacity and used_capacity values.
Returns the VDisk numerical ID.
Specifies the ID of the storage pool that the volume belongs to. If the volume has more than one copy, these fields display many.
Specifies the name of the storage pool that the volume belongs to. If the volume has more than one copy, these fields display many.
Specifies the MDisk numerical ID that is used for sequential and image mode volumes. If the volume has more than one copy, these fields display many.
Specifies the MDisk name that is used for sequential and image mode volumes. If the volume has more than one copy, these fields display many.
Specifies the mirror write algorithm priority being used if the volume is mirrored.
Specifies the volume name.
Expressed as a percentage, specifies the ratio of volume capacity to real_capacity values. This value is always 100 for non-space-efficient volumes.
Remember: This value can be any percentage (but not blank) for compressed volume copies.
Specifies the ID of the preferred node for the volume.
Remember: This value must be numeric. (The value is zero if no node is configured in the I/O group that contains the preferred node.)
Specifies the number of space-efficient copies.
Remember: This value represents only space-efficient copies and is not used for compressed volume copies.
The value can be online, offline or degraded.
Specifies the rate for synchronization for mirrored copies.
Specifies the throttle rate of the volume.
Specifies the virtualization type of the volume. The value can be striped, sequential, image or many. The value many indicates that the volume has more than one copy, which can have different virtualization types.
Specifies the unit number for the volume. Only OpenVMS hosts require a unit number.
Specifies the UID of the volume.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-ibm-v7000-vdisk at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-StorageSystem-VDisk. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ibm-v7000-vdisk at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc IBM::StorageSystem::VDisk
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=IBM-StorageSystem-VDisk
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IBM-StorageSystem-VDisk
CPAN Ratings
http://cpanratings.perl.org/d/IBM-StorageSystem-VDisk
Search CPAN
http://search.cpan.org/dist/IBM-StorageSystem-VDisk/
Copyright 2013 Luke Poskitt.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install IBM::StorageSystem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IBM::StorageSystem
CPAN shell
perl -MCPAN -e shell install IBM::StorageSystem
For more information on module installation, please visit the detailed CPAN module installation guide.