2015-04-17 06:49 AM
I have SDK 5.2.2 and cDOT 8.2P3 cluster, I'm trying to fetch all disks in status 'broken'.
According to documentation 'query' option of 'storage-disk-get-iter' API call should work for cDOT OnTAP (not 7Mode), but I'm failing to get it working.
I wonder if someone has got a working piece of perl code to achieve it?
Solved! SEE THE SOLUTION
2015-04-17 09:52 AM
Yes, I have manged to get the queries working. For failed drives it would be something like:
my $in = NaElement->new('storage-disk-get-iter');
my $query = NaElement->new('query');
my $ownerInfo = NaElement->new('disk-ownership-info');
my $diskInfo = NaElement->new('storage-disk-info');
my $failedDiskData = $s->invoke_elem($in);
$s is of course your NaServer
I don't have any failed drives in my cmode clusters right now so I'm getting nothing back (num-records is zero).
In theory I guess you should run the 'invoke_elem' in a loop looking for 'next-tag' in case you have a lot of failures....
Let me know if that works (or doesn't!).
2015-04-20 05:03 AM
Thanks mate! It works as expected, ie it picks up a single broken disk in my cDOT cluster, but it is now also clear to me how to modify the script to pick muliple broken disks.