The NFS manipulates files. You can list, download and upload files, and also delete them.

Configuration parameters

Take a look at the configuration parameters of the component:

  • Operations: it lists available operation types - Hash Fields and Hash Payload.

  • IP server: IP number from the NPS server. This parameter does not support Double Braces.

  • Exported Path: Full path of the directory exported from the NFS server (this path is set up in the server file etc/exports). This parameter does not support Double Braces.

  • Maximum Retries: Maximum number of attempts to connect to the NFS server. This parameter does not support Double Braces.

  • UID: UID stands for User IDentifier. Linux uses the UID number to monitor users and verify their permissions. Files and directories initially have the same UID as the user who created them. It is used to grant access permission to the file. This parameter does not support Double Braces.

  • GID: The term GID stands for Group Identifier. Linux organizes files and directories into groups. The GID of a file is initially inherited from the user who creates the file. It is used to grant access permission to the file. This parameter does not support Double Braces.

  • GIDs: This parameter is optional. It lists a maximum of 16 GID numbers to which the user is part. It must be separated by a comma. E.g.: 0,1. This parameter does not support Double Braces.

  • File Name: it is the local file name used for downloading, uploading, and filtering files in a list.

  • Remote File Name: NFS server file name.

  • Remote Directory: Remote directory name.

  • Exact Match: it is a filter. When activated, it searches exactly what is specified in the File Name field, otherwise, it will make an approximate search.

  • Fail On Error: If the option is enabled, pipeline executions will be interrupted if an error occurs. Otherwise, the execution of the pipeline continues, but the result of the success property will be false in the output of the component.


    IMPORTANT: in order to have access to the directory of an NFS server through our component, the /etc/exports archive will have to be configured using * character to map the customer's IP. E.g.:

/home *(rw,sync,nohide)

Some of the parameters above support Double Braces. To better understand how this language works, read our article by clicking here.

Supported Digibee platforms

Only dedicated Saas platforms are supported.

It is not supported in SaaS Digibee due to NFS protocol features that work only on private and local networks.

Supported versions

We only support NFS version 3.

Messages flow

Input

No specific message is required in the input. You may only set up the fields required for each operation.

Output

LIST

{
"files": [
{
"name": "file.txt",
"isDirectory": false,
"lastModified": 1630959695395,
"size": 0,
"fileId": 137410,
"type": 1
}
],
"success": true
}

UPLOAD and DOWNLOAD

{
"remoteDirectory": "/",
"fileName": "file.txt",
"remoteFileName": "file-remote.txt",
"success": true
}

DELETE

{
"remoteDirectory": "/",
"remoteFileName": "file-remote.txt",
"success": true
}

ERROR

{
"success": false,
"message": "com.digibee.pipelineengine.exception.PipelineEngineConfigurationException: Error loading connector nfs-connector. Error: com.digibee.pipelineengine.exception.PipelineEngineConfigurationException: com.emc.ecs.nfsclient.mount.MountException: mount failure, server: 192.168.56.101, export: /var/nfs/digibee, nfs version: 3, returned state: 13",
"error": "com.emc.ecs.nfsclient.mount.MountException: mount failure, server: 192.168.56.101, export: /var/nfs/digibee, nfs version: 3, returned state: 13"
}

  • success: it is “false” when an execution error has occurred

  • message: it is the component’s error message

  • error: it is an error message received from NFS.

NFS in Action

  • Listing while filtering - Exact Match is disabled

    Server IP : 192.168.56.101

    Exported Path: /var/nfs/general

    Operation : LIST_FILTER,

    Remote Directory: /

    File Name: test,

    Exact Match: disabled

    UID: 0,

    GID: 0,

    Maximum Retries: 3,

    Fail On Error: disabled

    Output:

    {
    "files": [
    {
    "name": "test.txt",
    "isDirectory": false,
    "lastModified": 1630959695395,
    "size": 0,
    "fileId": 137410,
    "type": 1
    },
    {
    "name": "file-test.txt",
    "isDirectory": false,
    "lastModified": 1630959695395,
    "size": 0,
    "fileId": 137410,
    "type": 1
    }

    ],
    "success": true
    }

  • Listing while filtering - Exact Match is enabled

    Server IP : 192.168.56.101

    Exported Path: /var/nfs/general

    Operation : LIST_FILTER,

    Remote Directory: /

    File Name: test.txt,

    Exact Match: habilitado

    UID: 0,

    GID: 0,

    Maximum Retries: 3,

    Fail On Error: desabilitado

    Output:

    {
    "files": [
    {
    "name": "test.txt",
    "isDirectory": false,
    "lastModified": 1630959695395,
    "size": 0,
    "fileId": 137410,
    "type": 1
    }
    ],
    "success": true
    }

  • Download

    Server IP : 192.168.56.101

    Exported Path: /var/nfs/general

    Operation : DOWNLOAD,

    Remote Directory: /

    File Name : file.txt

    Remote File Name : file-remote.txt,

    UID: 0,

    GID: 0,

    Maximum Retries: 3,

    Fail On Error: desabilitado

    Output:

    {
    "remoteDirectory": "/",
    "fileName": "file.txt",
    "remoteFileName": "file-remote.txt",
    "success": true
    }

  • Upload

    Server IP : 192.168.56.101

    Exported Path: /var/nfs/general

    Operation : UPLOAD,

    Remote Directory: /

    File Name : file.txt

    Remote File Name : file-remote.txt,

    UID: 0,

    GID: 0,

    Maximum Retries: 3,

    Fail On Error: desabilitado

    Output:

    {
    "remoteDirectory": "/",
    "fileName": "file.txt",
    "remoteFileName": "file-remote.txt",
    "success": true
    }

  • Delete

    Server IP : 192.168.56.101

    Exported Path: /var/nfs/general

    Operation : DOWNLOAD,

    Remote Directory: /

    Remote File Name : file-remote.txt,

    UID: 0,

    GID: 0,

    Maximum Retries: 3,

    Fail On Error: desabilitado

    Output:

    {
    "remoteDirectory": "/",
    "remoteFileName": "file-remote.txt",
    "success": true
    }

Did this answer your question?