The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IBM::StorageSystem::Disk - Class for operations with IBM StorageSystem disks

VERSION

Version 0.01

SYNOPSIS

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 disk ID system_vol_00 as an IBM::StorageSystem::Disk object.
	my $disk = $ibm->disk( 'system_vol_01' );

	# Print the file system to which the disk is assigned
	print $disk->file_system;

	# Prints "fs1"
	
	# Print the pool to which the disk is assigned
	print "Disk pool: ", $disk->pool, "\n";

	# Prints "Disk pool: system"
	
	# Print the availability and failure group for all disks in a nicely formatted list
	printf("%-20s%-20s%-20s%-20s\n", 'File System', 'Disk', 'Availability', 'Failure Group');
	printf("%-20s%-20s%-20s%-20s\n", '-'x18, '-'x18, '-'x18, '-'x18, '-'x18);

	map { printf( "%-20s%-20s%-20s%-20s\n", 
		$_->file_system,
		$_->name,
		$_->availability,
		$_->failure_group) 
	} $ibm->get_disks;

	# Prints:
	#
	# File System         Disk                Availability        Failure Group       
	# ------------------  ------------------  ------------------  ------------------  
	# fs1                 silver_vol_00       up                  1                   
	# fs1                 silver_vol_01       up                  1                   
	# fs1                 silver_vol_02       up                  1                   
	# fs1                 silver_vol_03       up                  1                   
	# fs1                 silver_vol_04       up                  1                   
	# fs1                 silver_vol_05       up                  1

METHODS

availability

Returns the disk availability status.

block_properties

Returns a comma-separated list of the disk block properties.

failure_group

Returns the disk failure group.

file_system

Returns the file system to which the disk is allocated.

name

Returns the name of the disk.

pool

Returns the pool of which the disk is a member.

status

Returns the disk status.

timestamp

Returns a timestamp of the last time at which the CTDB disk information was updated.

type

Returns the disk type.

AUTHOR

Luke Poskitt, <ltp at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc IBM::StorageSystem::Disk

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.