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.
On this page
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}
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}
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}
- The documented mount protocol is
nfs. - Use
sourceNodeIdwhen the source is another platform node. - Use
sourceHostinstead when the storage server is identified by an IP address or domain name. readOnly falseprovides read/write access and is the default.readOnly truerestricts 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}
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}
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
| Parameter | Description |
|---|---|
{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.
