Mounting Filestore file share on Compute Engine clients

  • date 1st June, 2021 |
  • by Prwatech |


GCP account

Open Console

Open Menu > Compute Engine > VM Instances

NB : The Instance should be created in the VPC network

Click on SSH of the Instance

Use the following commands to install NFS on Debian or Ubuntu

$     sudo apt-get -y update &&
$     sudo apt-get install nfs-common

Make a local directory to map to the file share:

$     sudo mkdir -p <mount-point-directory>

Open the Filestore instance

Copy the NFS Mount Point.

It is used to mount the fileshare on a Client VM

Mount the file share from the Filestore instance 

$     sudo mount <ip-address:/file-share> <mount-point-directory>

Change  ip-address:/file-share and paste the NFS Mount Point of your instance

Give your mount point directory of yours

Confirm that the Filestore file share is mounted:

$     df -h –type=nfs

Creating and mounting subdirectories on the file share

To create a subdirectory on the mounted file share

$     sudo mkdir -p mount-point-directory/file-share-sub-dir

Mount the subdirectory:

$     sudo mount ip-address:/file-share/file-share-sub-dir mount-point-directory/sub-dir

Confirm that the Filestore file share is mounted:

$   df -h –type=nfs

Quick Support

image image