Mount Data Container

The most common example of data mounting is when both client and server are located within the same Jelastic platform.

Tip: In case you need to mount data from a container, that is run at another Jelastic installation, you have to preliminary configure it as an external NFS server.

1. In the Add Mount Point frame, switch to the Data Container tab and fill in the required fields.

mount from any data container

Here, the following parameters should be defined:

  • Mount Point - path to local folder the mounted content will be displayed at

    Note:

    • if the specified directory doesn’t exist, it will be created automatically
    • path can’t start with /proc, /dev, /sys, /run or be equal to the following: /, /bin, /lib, /lib64, /lib32, /usr, /usr/bin, /usr/sbin, /usr/lib or /usr/lib64 (this list may vary based on your provider’s settings)
  • NFS Server - expandable list of nodes on your account which can be used as data storage container
    Note: It is not allowed to mount data from the same node you’ve exported it to the current container, i.e. to create cross-mounts. This also includes restriction on building closed circle of mounts by means of intermediate nodes.
  • Remote path - the required directory location at a remote container (you can either type it manually or choose one of the favorite paths on that node from the automatically fetched drop-down list)
  • Mount to all nodes - switcher to set the same mounts to be added for all nodes within a layer (including those that could be added further as a result of horizontal scaling)
  • Read Only - turn the switcher on to restrict the mounted data editing at client nodes (by default, the read & write rights are provided)

Click Add to proceed.

Note: If not a Dedicated Storage Container has been chosen as a data container, a brief one-time delay (up to a few minutes) may take place due to the required NFS software installation.

2. In a moment your mount point will be created and added to the list. So, you can either Navigate to directory (double click on the corresponding record) or Unmount it (with the same-named button at the tool pane) when it becomes unnecessary.

mount points actions list

Also, both of these actions are available by means of the Additionally list for every mount.

3. Upon navigating inside, you’ll see the same content as on your storage.

switch between nodes in file manager

Due to the configurations, stated in this example (namely - the enabled Mount to all nodes option and disabled Read Only one), the mounted content should be available and editable at all containers of the layer. You can check this through switching among nodes using the drop-down list at the left-hand menu (circled above).

Take into consideration that in order to be editable (i.e. if clients are granted RW rights to it), the mounted from a storage folder should have the same permissions for the same user as on a client node (since the default user names may vary for different servers - e.g. root and jelastic).

If needed, execute the following command on your storage server while being connected to it via SSH to adjust the rights:

chown {uid}:{gid} {path}

Here:
  • {uid} - user ID, which can be found in the /etc/passwd file
  • {gid} - group identifier, that is shown within the /etc/group file
  • {path} - path to the directory or file you’d like to change the permissions for

change folder's owner