The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IBM::V7000::FileSystem - Class for operations with a IBM V7000 file system entities

VERSION

Version 0.01

SYNOPSIS

IBM::V7000::FileSystem - Class for operations with a IBM V7000 file system entities

        use IBM::V7000;
        
        my $ibm = IBM::V7000->new(      user            => 'admin',
                                        host            => 'my-v7000',
                                        key_path        => '/path/to/my/.ssh/private_key'
                                ) or die "Couldn't create object! $!\n";

        # Print the block size of file system 'fs1'
        print $ibm->fs(fs1)->block_size;
        
        # Get the file system 'fs2' as a IBM::V7000::FileSystem object
        my $fs = $ibm->fs(fs2);

        # Print the mount point of this file system
        print "fs2 mount point: " . $fs2->mount_point . "\n";

        # Call a function if inode usage on file system 'fs2' exceeds 90% of maximum allocation.
        monitoring_alert( 'Inode allocation > 90% on '.$fs->device_name ) 
                if ( ( ( $fs->inodes / $fs->max_inodes ) * 100 ) > 90 );

        # Do the same for all file systems
        map { monitoring_alert( 'Inode allocation > 90% on '.$_->device_name )
                if ( ( ( $fs->inodes / $fs->max_inodes ) * 100 ) > 90 ) } $ibm->get_fss;

METHODS

acltype

Returns the file system ACL type in use.

atime

Returns the value of the file system atime flag status.

block_allocation_type

Returns the value of the file system block allocation type.

block_size

Returns the file system block size.

cluster

Returns the cluster ID of the cluster on which the filesystem is mounted.

def_quota

Returns the value of the file system defined quota flag.

device_name

Returns the file system device name.

dmapi

Returns the file system DMAPI enabled status.

ind_block_size

Returns the file system indirect block size.

inode_size

Returns the file system inode size.

inodes

Returns the current number of allocated inodes for the file system.

last_update

Returns the last time the file system CTDB information was updated.

locking_type

Returns the file system locking type.

log_placement

Returns the file system log placement scheme.

logf_size

Returns the file system log file size.

max_inodes

Returns the maximum number of allocatable inodes for the file system.

min_frag_size

Returns the file system minimum fragment size.

mount_point

Returns the file system mount point.

mtime

Returns the file system mtime flag status.

quota

Returns the file system quota type.

remote_device

Returns the file system remote device.

replication

Returns the file system replication status.

snapdir

Returns the file system snapdir flag status.

get_snapshots

Returns an array of IBM::StorageSystem::Snapshots for the file system.

See IBM::StorageSystem::Snapshot for further information.

state

Returns the file system operational state.

type

Returns the file system type.

version

Returns the file system version.

fileset( $id )

        # Get fileset ID 200 on file system 'fs1' and print the number of used inodes
        my $fs = $ibm->filesystem(fs1);
        my $fileset = $fs->fileset(200);
        print $fileset->inodes;

        # Alternately
        print $ibm->filesystem(fs1)->fileset(200)->inoeds;

Returns the fileset for this filesystem specified by the numerical identifier as a IBM::StorageSystem::FileSystem::FileSet object.

Note that this is a caching method and that a previously retrieved IBM::StorageSystem::FileSystem::FileSet object will be returned if one has been cached from previous invocations.

get_fileset( $id )

This is a funtionally equivalent non-caching implementation of the fileset method.

get_filesets

        # Print all filesets for this filesystem, their current, maximum and allocated inodes

        foreach my $fileset ( $filesystem->get_filesets ) [
                print   "Name: " . $fileset->name . "\n" .
                        "Used inodes: " . $fileset->inodes . "\n" .
                        "Allocated inodes: " . $fileset->alloc_inodes . "\n" .
                        "Maximum inodes: " . $fileset->max_inodes . "\n" .
                        "---------------------------------------\n"
        }

Returns an array of IBM::StorageSystem::FileSystem::FileSet objects representing all filesets for the specified file system.

AUTHOR

Luke Poskitt, <ltp at cpan.org>

BUGS

Please report any bugs or feature requests to bug-ibm-v7000-filesystem at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=IBM-V7000-FileSystem. 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::V7000::FileSystem

You can also look for information at:

SEE ALSO

IBM::StorageSystem, IBM::StorageSystem::FileSystem::FileSet

LICENSE AND COPYRIGHT

Copyright 2012 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.