Software Development Kit (SDK) and API Discussions

volume-clone-create not working

gasparuben
4,184 Views

Using ZEDI I have generated following code to generate a clone on C-mode cluster:

require 5.6.1;
use lib '/opt/netapp-manageability-sdk-5.0R1/lib/perl/NetApp';
use strict;
use warnings;
use NaServer;
use NaElement;


my $s = new NaServer('Cname', 1 , 15);
$s->set_server_type('FILER');
$s->set_transport_type('HTTPS');
$s->set_port(443);
$s->set_style('LOGIN');
$s->set_admin_user('vsadmin', 'XXXXXX');


my $api = new NaElement('volume-clone-create');
$api->child_add_string('junction-active','true');
$api->child_add_string('junction-path','/ORA/dbs03/PEPE');
$api->child_add_string('parent-snapshot','snapscript_31102013_195117_92');
$api->child_add_string('parent-volume','postgres03');
#$api->child_add_string('space-reserve','true');
#$api->child_add_string('use-snaprestore-license','<use-snaprestore-license>');
$api->child_add_string('volume','pepe');

my $xo = $s->invoke_elem($api);
if ($xo->results_status() eq 'failed') {
    print 'Error:\n';
    print $xo->sprintf();
    exit 1;
}

print 'Received:\n';
print $xo->sprintf();

This is failing with error:

$ perl /tmp/clone.pl

Error:\n<results reason="Aggregate aggr4_c01n02 does not exist" status="failed" errno="14420"></results>

aggr4_c01n02 is the containing aggregate of the parent volume. It definitely exists. The filer is running Ontap 8.2P3. I am connecting  to the cluster using a lif.

Thanks for your support.

Ruben

3 REPLIES 3

gasparuben
4,184 Views

Hi,

Just to say I have tried with the latest version of Zapi and still it fails with same error:

[oracle@dbsrvg407 bin]$ perl /tmp/clone.pl

Error:\n<results reason="Aggregate aggr4_c01n02 does not exist" status="failed" errno="14420"></results>

The aggregate does exist.

c02::> aggr show

Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status

--------- -------- --------- ----- ------- ------ ---------------- ------------

aggr4_c01n02

           130.7TB   85.25TB   35% online      12 dbnasb402        raid_dp,

                                                                   normal

Thanks for your time,

Ruben

zulanch
4,184 Views

Hi Ruben,

You need to assign the aggregate to the vserver in order to use volume creation commands (including clones) in vserver/vsadmin context.

c02::> vserver modify -vserver <vsname> -aggr-list aggr4_c01n02, ...

Make sure to note the aggregates already assigned to the vserver and add them to the command so you don't accidentally remove assigned aggregates.

c02::> vserver show -vserver <vsname> -fields aggr-list

-Ben

gasparuben
4,184 Views

Indeed thanks for pointing out!

Ruben

Public