Mounting File Share on Linux FME Server

Merline George
Merline George
  • Updated

Introduction

Resource folders are a convenient storage option for uploading and storing data that can be used when running workspaces on your Linux-hosted FME Server. Besides directly uploading data via the FME Server Web UI, an existing file-share can be added to the system resources and can be navigated through the FME Server Web UI.

There are two options for creating a Resource Connection with a file-based repository:

1.Network-based resource- This involves mounting file shares hosted on other Linux or Windows systems to the FME server host and connecting to them via a local UNC path.

2. Cloud-based resource- FME Server currently provides the option to connect an Amazon S3 Bucket.  
Please be advised that these instructions were tested with FME Server 2022 hosted on Ubuntu 20.04.4 LTS 
  

Step-by-Step Instructions

Part 1: Connecting a Network-based resource 

This process includes mounting a Linux/Windows file share onto a Linux-based FME Server host and then creating a new resource connection on the FME Server Web UI using a local UNC path. 
Network File System(NFS) and Common Internet File System (CIFS) are common network mounting/file-sharing protocols. CIFS can only be used in Windows systems whereas NFS is compatible with UNIX and LINUX-based systems. 
 

  • Mounting a Linux-based file share with NFS

  1. Installing NFS Kernel Server on the Linux file share host
  • Connect to the Linux machine that hosts the file share via SSH 
  • Update all the system packages and install the nfs-kernel-server package
sudo apt update
sudo apt install nfs-kernel-server

 
  • Assign file share directory’s ownership to the appropriate user account and provide read, write and execute privileges to all the contents inside the directory
sudo chown -R <username>:<groupname> <FileShareDirectoryPath>
sudo chmod 777 <FileShareDirectoryPath>

 
For example-
sudo chown -R fmeserver:fmeserver /mnt/nfs_share_MG
sudo chmod 777 /mnt/nfs_share_MG

 
Please ensure that the FME Server Services are also running under the same user account to avoid permission issues.
 

 

  • Grant NFS Share Access to FME Server host- This can be defined in the /etc/exports file.
Open the /etc/exports file in a text editor-
sudo vim /etc/exports

Add this line to the file -
<FileShareDirectoryPath> <FMEServerHostIP>(rw,sync,no_subtree_check)
 
For example-
/mnt/nfs_share_MG 10.1.102.48(rw,sync,no_subtree_check)
 
  • Export the NFS Share Directory and restart the NFS kernel server to commit the changes
sudo exportfs -a
sudo systemctl restart nfs-kernel-server

 
  • (OPTIONAL) Allow NFS Access through the Firewall if required
sudo ufw allow from <FMEServerHostIP> to any port nfs
sudo ufw enable
sudo ufw status

 

  1. Installing the NFS Client on the FME Server host
  • Connect to the Linux FME Server host via SSH
  • Update all the system packages and install the nfs-common package
sudo apt update
sudo apt install nfs-common

 
  • ​​Create an NFS mount point
sudo mkdir -p <FMEServerMountDirectoryPath>

For example-
sudo mkdir -p /mnt/nfs_clientshare_MG
 
  • Mount NFS Share
sudo mount <FileShareHostIP>:<FileShareDirectoryPath>  <FMEServerMountDirectoryPath>

For example-
sudo mount 10.1.103.94:/mnt/nfs_share_MG  /mnt/nfs_clientshare_MG
 
  • ​​​​​Verify the contents on the FME Server to test configuration
ls -l <FMEServerMountDirectoryPath>
 
  • Mounting a Windows-based file share with CIFS

  1. Configuring the file share folder on the Windows file share host
  • Right-click on the file share folder, select “Properties” and navigate to the “Sharing” tab.
  • Add the required user account to share the folder with and provide them with Read/Write permissions.
  • Make a note of the “Network Path” of the file share folder which will be required for configuring CIFS on the FME Server Host.
Please ensure that the FME Server Services are also running under the same user account to avoid permission issues.
 
UC1.png

 

  1. Installing and configuring CIFS on the FME Server Host
  • Connect to the Linux FME Server host via SSH
  • Update all the system packages and install the cifs-utils package
sudo apt update
sudo apt install cifs-utils

 
  • Create a CIFS mount point
sudo mkdir <FMEServerMountDirectoryPath>
 
For example-
sudo mkdir /mnt/win_share_MG
 
  • Mount Windows Share via CIFS
sudo mount -t cifs -o username=<username> <WindowsFileShareNetworkPath>  <FMEServerMountDirectoryPath>
 
The value <WindowsFileShareNetworkPath> can be found on the Windows folder’s “Properties” window as “Network Path”. IP address can be used here instead of the FQDN/host name. 
 
For example- 
sudo mount -t cifs -o username=mgeorge "//10.1.102.11/FME File Share" /mnt/win_share_MG
 

We can also use gid [group id] and uid [user id] of the said account to mount the share. These ids can be found using these commands:


id -g <groupname>

id -u <username>

mount -v -t cifs <WindowsFileShareNetworkPath> <FMEServerMountDirectoryPath> -o gid=<gid>,uid=<uid>

  • Verify the contents on the FME Server to test configuration
ls -l <FMEServerMountDirectoryPath>
 
  • Creating a  New Resource Connection on FME Server Web UI

  1. Navigate to “Files & Connections” >“Resources”  and click “New” on the FME Server Web UI.

 

UC2.png

 

  1. Create New Resource Connection with the appropriate Name, Display name, Description and the following settings-
Type= Network Based Resource 
Directory of a network file based resource = Complete UNC path to the local file-mount directory/folder on the FME Server Host.
 
UC3.png
 
 

Part 2: Connecting an Amazon S3 Bucket 

  1. Navigate to “Files & Connections” >“Resources”  and click “New” on the FME Server Web UI.

 

UC2.png

 

  1. Create New Resource Connection with the required Name, Display Name, Description and the following settings-
Type= Amazon S3 bucket
The values for the Amazon S3 bucket name, Access key and Secret Key would be available via the AWS Management Console. Please contact your IT administrator. 
 
UC5.png
 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.