I want to mount a network file share on an Amazon WorkSpaces Linux WorkSpace.
Resolution
Mount an Amazon EFS file share on a Linux WorkSpace
To mount an Amazon Elastic File System (Amazon EFS) file system in a Linux WorkSpace, you must use the mount target's IP address and not the DNS name. To mount an EFS file system, complete the following steps:
- Open the Amazon EFS console.
- Select the file system that's your mount target.
- In the Details pane, under Mount targets, copy the IP address.
- Configure the EFS file system security group to allow inbound traffic to TCP port 2049 from the abcxyz_workspacesMembers security group.
- To mount the EFS file system on the Linux WorkSpace, run the following command:
sudo mount -t nfs EFS_FILE_SYSTEM_IP_ADDRESS:/ /mnt/efs
Note: Replace EFS_FILE_SYSTEM_IP_ADDRESS with the IP address of your mount target.
- To verify that you successfully set up the network file share, run the following command:
df -h
The command's output that shows the mounted EFS file system looks similar to this:
EFS_FILE_SYSTEM_IP_ADDRESS /mnt/efs
Mount a Windows file share on a Linux WorkSpace
To mount a Windows file share on a Linux WorkSpace, complete the following steps:
-
Install the cifs-utils package.
For an Amazon Linux 2 WorkSpace, run the following command:
sudo yum install cifs-utils
For an Ubuntu WorkSpace, run the following command:
sudo apt install cifs-utils
For a Red Hat Enterprise Linux WorkSpace, run the following command:
sudo dnf install cifs-utils
-
To set up a directory on your Linux system as your mount point, run the following command:
sudo mkdir -p /mnt/windows-share
Note: Replace windows-share with your directory name.
-
To authenticate with Kerberos, run the following command:
kinit
-
To mount the Windows file share, run the following mount.cifs command:
sudo mount -t cifs //server/share /mnt/windows-share --verbose -o vers=3.0,cache=none,user=$USER,cruid=$USER,sec=krb5,uid=$(id -u),gid=$(id -g)
Note: Replace the //server/share with the universal naming convention (UNC) path of your Windows file share.
-
To verify that you successfully set up the network file share, run the following command:
df -h
To automatically mount the file share on system boot, add the mount command to your Linux system's /etc/fstab file. It's a best practice to automatically mount the file share if you need to access it frequently.
Related information
Mounting EFS file systems
How to access Amazon FSx for Windows File Server from a Linux client on the YouTube website
Mounting a file share on an Amazon Elastic Compute Cloud (Amazon EC2) Linux instance