2013-10-22 03:43 PM
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.
Solved! SEE THE SOLUTION
2013-10-31 11:08 AM
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.
- Rick -
2013-10-31 01:53 PM
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.
2013-11-04 12:50 PM
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.
2013-11-05 06:10 AM
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!
2013-11-19 02:29 PM
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:
Ugh! Is there ANY consistency in cDOT?
2013-11-20 01:06 PM
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.
- Rick -
2013-11-21 06:06 AM
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:
<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.
2013-11-21 02:17 PM
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
<results reason="Unable to find API: file-delete-file" status="failed" errno="13005"></results>
Disappointing but not unexpected
2015-08-26 12:25 AM
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'