Software Development Kit (SDK) and API Discussions

Build list of files on a volume

uzimmermann
3,895 Views

We currently use a NetApp v3140 to house a NFS volume for images. Currently there are about 25-26 million files. Once a week we are running a find on that volume to build a list of files, but lately it has been slower and slower, taking 12-20 hours. All we need is a list of names, for this purpose we do not care about the path or any other information returned by stat.

So my question, is there a way via the SDK/API to get a list of files, which could be faster?

2 REPLIES 2

amirm
3,892 Views

Hi,

You can try "file-list-directory-iter-*"   API to get the list of files in a directory path starting with "/vol" and then iterate over the list using "file-list-directory-iter-next" API to get the info about the individual file like name,etc.

While iterating you can query how many more records are remaining, whether to continue or stop,etc.

Regards,

-Amir

kevingraham
3,892 Views

uzimmermann wrote:

So my question, is there a way via the SDK/API to get a list of files, which could be faster?

As Amir mentioned, there are ZAPI calls for this, however they're not going to be more efficient than walking it via NFS.

Public