API "volume-get-iter” is used to get the list of volumes on a cluster. When we run this against a cluster which has more than 1000 volumes, it is not retrieving entire volume list. For example, when we ran this on a cluster, it returned 1002 volumes but we have 1258 volumes on that cluster.
Here is the sample code used to retrieve the list of volumes on a cluster. please let me know if any one has experienced this issue.
my $in = NaElement->new("volume-get-iter");
$in->child_add_string( 'max-records', 10000 );
my $output = $cluster_conn->invoke_elem($in);
if ( $output->results_errno != 0 ) {
exit;
}
else
{
foreach ( $output->child_get("attributes-list")->children_get() )
{
my $volname = $_->child_get("volume-id-attributes")->child_get_string("name");
my $aggrname = $_->child_get("volume-id-attributes")->child_get_string("containing-aggregate-name");
print "$aggrname,$volname\n";
}
}
Regards
Unni