Subscribe
Accepted Solution

How do I run the file-list-directory-iter API against the root vol of a cluster node?

How do I run the file-list-directory-iter API against the root vol of a cluster node? Every time I try I receive an error such as "Unable to find API: file-list-directory-iter on node vserver". How does one invoke this API against a cluster node server's root volume? I've had no issues invoking it against a data vserver's volumes. Please advise.

rle Former NetApp Employee

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

Hi Scott,

The API is file-list-directory-iter and it is a Vserver or VSM API which means that you need to invoke the API for each Vserver in your cluster.

Regards,

   - Rick -

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

I'm not having any trouble running it against any other vServer, but I can't get it to run against a node, that being the "physical" Filer. I need to be able to see into it's root volume, but the API won't let me connect. I get the following error:

Unable to find API: file-list-directory-iter on node vserver

I am able to run this against the root volume, or any contained volume for that matter, that resides on a data vserver. Only the node vserver is balking.

     Scott

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

Hi Scott,

This is probably not a supported operation, but you can query the node root volumes using the old 7-mode file-list-directory-iter-start/next/end APIs.

-Ben

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

WOW! Never thought of that! I'll try it and post the results.

I will be on vacation for a week starting tomorrow, so it'll be over a week before I can test and report back.

Thanks for the tip! If this works, we'll have some happy campers here!

     Scott

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

I finally got the change to test this, and WOW it works! I started testing it a couple of weeks ago and it failed miserably so I played with apitest this morning, and it took off running. I don't know what I screwed up last time, but if you treat it like a 7-mode vFiler it works fine.

Now for the bummer. Now that I've got the code working to get the list of files and decide which ones to delete, I find that the following APIs aren't present on the cluster node:

volume-get-root-name

file-delete-file

file-delete-directory

Ugh! Is there ANY consistency in cDOT?

rle Former NetApp Employee

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

Hi Scott,

What was your exact test?  Running <API X> on a node vserver?

volume-get-root-name, file-delete-file, and file-delete-directory are available on the vserver only, not at the cluster level.  Only vservers have access to data.

Regards,

   - Rick -

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

I tried something like this:

apitest.pl  -t filer -v CLUSTER_NODE -s CLUSTER 'USERNAME' 'PASSWORD' file-delete-file path /vol/NODE_ROOTVOL/etc/crash/man.dump

I got this back:

OUTPUT:
<results reason="Unable to find API: file-delete-file on node vserver CLUSTER_NODE" status="failed" errno="13005"></results>

I can run "file-list-directory-iter-start" in the same fashion, and it succeeds. But file-delete-file, file-delete-directory, and volume-get-root-name all fail with similar error messages to the above. I've since found that I also cannot run 'system-api-list', so I can't even list what APIs I CAN run! Frustrating.

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

For "completeness" I also tried:

apitest.pl  -t filer -s CLUSTER_NODE 'USERNAME' 'PASSWORD' file-delete-file path /vol/NODE_ROOTVOL/etc/crash/man.dump

and got the extremely similar error

OUTPUT:
<results reason="Unable to find API: file-delete-file" status="failed" errno="13005"></results>

Disappointing but not unexpected

Re: How do I run the file-list-directory-iter API against the root vol of a cluster node?

hello, 

i am new starter to use ontap api. i want to use file-list-directory start/next/end/ to list files of a foder(20+ million). When i enter tag to next/end from previous result of iter-start. it show error below:

 

Results errno='13001' reason='Unable to open zapi iterator next file: /etc/.zapi/141528826958583814.next, error=No such file or directory' status='failed'

 

Any idea?