I wrote a perl code to resize size a volume (extend volume size by X mb).
I am getting following error.
#!/usr/bin/perl
use strict;
use NaServer;
use Getopt::Long;
use WFAUtil;
my $cmarray;
my $vserver;
my $volumeName;
my $volumesize;
GetOptions ("cmarray=s" => \$cmarray,
"vservername=s" => \$vserver,
"volumeName=s" => \$volumeName,
"volumesize=i" => \$volumesize) or die 'Illegal command parameters';
if (defined $volumesize && $volumesize < 0)
{
die 'Negative volumesize argument not allowed: \''.$volumesize.'\'';
}
my $wfaUtil = WFAUtil->new();
$wfaUtil->sendLog('INFO','Connecting to array: '.$cmarray);
my $server = $wfaUtil->connect($cmarray,$vserver);
$wfaUtil->sendLog('INFO','Setting volume size : '.$volumesize.' on volume: '.$volumeName);
my $out = $wfaUtil->checkFailure('Failed running volume-size',$server->invoke('volume modify ',' -volume ',$volumeName,' -size ',' +',$volumesize.'m'));