Mounting Filestore file share on Compute Engine clients

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

Mount Filestore on Compute Engine clients

 

Mounting Filestore on Compute Engine clients in Google Cloud Platform (GCP) allows users to access and utilize file shares hosted on Filestore instances from within their virtual machine (VM) instances. This capability enables seamless collaboration and data sharing across VM instances, facilitating efficient workflows and data-driven applications.

 

Prerequisites

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 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

 

Mount Filestore on Compute Engine clients

Quick Support

image image