Mount Points

CLI Tutorial: Mount Points

Mount points connect a data-storage server with client containers so remote shared files can be used similarly to local files. The platform CLI can list, validate, add, and remove mounts for individual nodes or complete environment layers.

List Existing Mount Points

Use getmountpoints to display mount points configured on a particular node:

~/jelastic/environment/file/getmountpoints \
  --envName {env_name} \
  --nodeId {node_ID}
List mount points through the platform CLI
Retrieve the mount points configured on the selected node.
Use nodeGroup instead of nodeId to display mount points for a complete environment layer such as cp, bl, or storage.

List Exported Directories

Use getexportedlist to review directories exported by the selected storage node:

~/jelastic/environment/file/getexportedlist \
  --envName {env_name} \
  --nodeId {node_ID}
List exported directories through CLI
Review the directories exported by the selected source node.

Add a Mount Point to One Node

Use addmountpointbyid to mount a shared directory on one client container:

~/jelastic/environment/file/addmountpointbyid \
  --envName {env_name} \
  --nodeId {node_ID} \
  --path {local_path} \
  --protocol {protocol} \
  --sourcePath {source_path} \
  --sourceNodeId {source_node_ID} \
  --readOnly {true/false}
Add a mount point by node ID
Add an NFS mount point to a specific client node.
  • The documented mount protocol is nfs.
  • Use sourceNodeId when the source is another platform node.
  • Use sourceHost instead when the storage server is identified by an IP address or domain name.
  • readOnly false provides read/write access and is the default.
  • readOnly true restricts the client to read-only access.

Check for Cross Mounts

Before adding a mount, use checkcrossmount when you need to confirm that the nodes are not already sharing data in the opposite direction:

~/jelastic/environment/file/checkcrossmount \
  --envName {env_name} \
  --nodeId {node_ID} \
  --sourceNodeId {source_node_ID}
Check for cross mounts through CLI
Verify whether the proposed source and client nodes create a cross-mount condition.
Cross-mount result: A returned value of true indicates that data is already shared in the opposite direction. A value of false means the mount can be added without creating that cross-mount condition.

Remove a Mount Point from One Node

Use removemountpointbyid with the environment, target node, and local mount path:

~/jelastic/environment/file/removemountpointbyid \
  --envName {env_name} \
  --nodeId {node_ID} \
  --path {local_path}
Remove a mount point by node ID
Remove the selected mount point from one client node.

Manage Mounts for a Complete Layer

To add the same mount point to every node in an environment layer, use addmountpointbygroup:

~/jelastic/environment/file/addmountpointbygroup \
  --envName {env_name} \
  --nodeGroup {env_layer} \
  --path {local_path} \
  --protocol {protocol} \
  --sourcePath {source_path} \
  --sourceNodeId {source_node_ID} \
  --readOnly {true/false}

To remove the mount point from the complete layer, use:

~/jelastic/environment/file/removemountpointbygroup \
  --envName {env_name} \
  --nodeGroup {env_layer} \
  --path {local_path}
Layer-level methods avoid running the same command separately for every container in a horizontally scaled node group.

Command Parameters

ParameterDescription
{env_name}Domain name of the environment containing the client or source node.
{node_ID}Unique identifier of the client node.
{env_layer}Environment-layer identifier such as cp, bl, or storage.
{local_path}Folder path on the client where the remote data should appear.
{protocol}Mount protocol. The documented value is nfs.
{source_path}Path to the shared files on the data-storage server.
{source_node_ID}Unique identifier of the source storage node.
{true/false}Read-only or read/write access for the mounted data.
Removal warning: Confirm that applications are no longer using the mounted directory before removing it from a node or layer.

What’s next?