Quickstart Using the Console

This quickstart shows you how to perform basic operations in Cloud Filestore using the Google Cloud console. In the quickstart, you will:

  • Create a Cloud Filestore instance.
  • Mount the fileshare from that instance on a client VM instance.
  • Create a file on the mounted fileshare.
  • Delete the Cloud Filestore instance.

Before you begin

  1. Select or create a GCP project.

    Go to the manage resources page

  2. Make sure that billing is enabled for your project.

    Learn how to enable billing

Create a Compute Engine VM instance to be the client

  1. Go to the Compute Engine instances page
  2. Click Create Instance.
  3. Set Name to nfs-client.
  4. Set Zone to us-central1-c.
  5. In the Boot disk section, click Change to begin configuring your boot disk.
  6. In the Public images tab, choose a Debian or Ubuntu image version.
  7. Click Select.
  8. In the Firewall section, select Allow HTTP traffic.
  9. Click Create to create the instance.

Create a Cloud Filestore instance

  1. Go to the Cloud Filestore instances page
  2. Click Create Instance.
  3. For Instance ID, type nfs-server.
  4. For Instance tier, leave Standard selected.
  5. For Region, select us-central1.
  6. For Zone, select us-central1-c.
  7. For Reserved address range, type
  8. For Fileshare name, type vol1.
  9. For Fileshare size, leave 1 TB selected.
  10. Click Create.

Mount the Cloud Filestore fileshare on the client

  1. Go to the VM instances page
  2. In the list of VM instances, click the SSH button for nfs-client to open a terminal window connected to that instance.
  3. Install NFS by running the following commands:

    sudo apt-get -y update
    sudo apt-get -y install nfs-common
  4. Make a mount directory for the Cloud Filestore fileshare by running the following command:

    sudo mkdir /mnt/test
  5. Mount the fileshare by running the mount command and specifying the Cloud Filestore instance IP address and fileshare name:

    sudo mount /mnt/test
  6. Make the fileshare accessible by changing the permissions:

    sudo chmod go+rw /mnt/test

Create a file on the fileshare

  1. In the terminal window that is connected to the nfs-client instance, create a file named testfile by running the following command:

    echo 'This is a test' > /mnt/test/testfile
  2. Confirm the file was created by running the following command:

    ls /mnt/test

    And verifying that testfile is in the directory contents returned.

Clean up

To avoid incurring charges to your Google Cloud account for the resources used in this quickstart, follow these steps.

  1. Delete the Cloud Filestore instance by following these steps:
    1. Go to the Cloud Filestore instances page
    2. Click the nfs-server instance ID to open the instance details page.
    3. Click Delete.
    4. When prompted, type the instance ID.
    5. Click Delete.
  2. Go to the VM instances page
  3. Click the name of the nfs-client instance.
  4. At the top of the instance's details page, click Delete.
  5. Follow the instructions at Shutting down projects to delete the GCP project you created.

What's next

  • Read the Cloud Filestore Overview to learn more about the basics of Cloud Filestore.
  • Set up a Cloud Filestore instance on your own by following the instructions at Creating Instances.
  • Read the Access Control to learn how to control access to Cloud Filestore operations as well as the resources on an instance.