IBM::StorageSystem::Disk - Class for operations with IBM StorageSystem disks
Version 0.01
IBM::StorageSystem::Disk is a utility class for operations with IBM StorageSystem disks.
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 drive ID 2 as an IBM::StorageSystem::Drive object - note that drive ID 2 # is not necessarily the physical disk in slot ID 2 - see notes below. my $drive = $ibm->drive( 2 ); # Print the drive capacity in bytes print $drive->capacity; # Print the drive vendor and product IDs print "Vendor ID: ", $drive->vendor_id, " - Product ID: ", $drive->product_id, "\n"; # Print the SAS port status and drive status for all drives in a nicely formatted list printf("%-20s%-20s%-20s%-20s\n", 'Drive', 'SAS Port 1 Status', 'SAS Port 2 Status', 'Status'); printf("%-20s%-20s%-20s%-20s\n", '-'x18, '-'x18, '-'x18, '-'x18); map { printf( "%-20s%-20s%-20s%-20s\n", $_->id, $_->port_1_status, $_->port_2_status, $_->status) } $ibm->get_drives; # e.g. # Drive SAS Port 1 Status SAS Port 2 Status Status # ------------------ ------------------ ------------------ ------------------ # 0 online online online # 1 online online online # 2 online online online # 3 online online online # ... # Print the drive ID, slot ID, MDisk name and member ID of all drives foreach my $drive ( $ibm->get_drives ) { print '-'x50, "\n"; print "Drive ID : " . $drive->id . "\n"; print "Slot ID : " . $drive->slot_id . "\n"; print "MDisk ID : " . $drive->mdisk_name . "\n"; print "Member ID : " . $drive->member_id . "\n"; } # e.g. # -------------------------------------------------- # Drive ID : 0 # Slot ID : 17 # MDisk ID : host-9 # Member ID : 3 # -------------------------------------------------- # Drive ID : 1 # Slot ID : 19 # MDisk ID : host-2 # Member ID : 11 # -------------------------------------------------- # Drive ID : 2 # Slot ID : 19 # MDisk ID : host-1 # Member ID : 8 # -------------------------------------------------- # ... etc.
Returns the disk availability status.
Returns a comma-separated list of the disk block properties.
Returns the disk failure group.
Returns the file system to which the disk is allocated.
Returns the name of the disk.
Returns the pool of which the disk is a member.
Returns the disk status.
Returns a timestamp of the last time at which the CTDB disk information was updated.
Returns the disk type.
Luke Poskitt, <ltp at cpan.org>
<ltp at cpan.org>
Please report any bugs or feature requests to bug-ibm-v7000-disk at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-StorageSystem-Disk. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-ibm-v7000-disk at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc IBM::StorageSystem::Disk
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-Disk
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/IBM-StorageSystem-Disk
CPAN Ratings
http://cpanratings.perl.org/d/IBM-StorageSystem-Disk
Search CPAN
http://search.cpan.org/dist/IBM-StorageSystem-Disk/
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.