Software Development Kit (SDK) and API Discussions

volume-clone-create not working

gasparuben

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

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

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

Indeed thanks for pointing out!

Ruben

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public