Quickstart Using the Console

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

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

Before you begin

  1. Sign in to your Google Account.

    If you don't already have one, sign up for a new account.

  2. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to the project selector page

  3. Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.

When you finish this tutorial, you can avoid continued billing by deleting the resources you created. For more information, see Cleaning up.

Create a Compute Engine VM instance to be the client

  1. In the Cloud Console, go to the VM Instances page.

    Go to the Compute Engine instances page

  2. Click Create Instance and configure the instance as follows.

    • Set Name to nfs-client.
    • Set Zone to us-central1-c.
    • Set Boot disk to Google Drawfork Debian GNU/Linux 9.
    • In the Firewall section, select the Allow HTTP traffic checkbox.
  3. Click Create to create the instance.

Create a Filestore instance

  1. In the Cloud Console, go to the Filestore Instances page.

    Go to the Filestore instances page

  2. Click Create Instance and configure the instance as follows:

    • Set Instance ID to nfs-server.
    • Set Instance type to Basic.
    • Set Storage type to HDD.
    • Set Allocate capacity to 1TB.
    • Set Region to us-central1 and Zone to us-central1-c.
    • Set VPC network to default.
    • Set File share name to vol1.
    • Set Allocated IP range to Use an automatically allocated IP range.
    • Set Access controls to Grant access to all clients.
  3. Click Create.

Mount the Filestore file share on the client

  1. In the Cloud Console, go to the VM Instances page.

    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 Filestore file share by running the following command:

    sudo mkdir -p /mnt/test
    
  5. Mount the file share by running the mount command and specifying the Filestore instance IP address and file share name:

    sudo mount 10.0.0.2:/vol1 /mnt/test
    
  6. Make the file share accessible by changing the permissions:

    sudo chmod go+rw /mnt/test
    

Create a file on the file share

  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 that the file was created by running the following command:

    ls /mnt/test
    

    and verifying that testfile is listed.

Clean up

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

Deleting the Google Cloud project

  1. In the Cloud Console, go to the Manage resources page.

    Go to the Manage resources page

  2. In the project list, select the project that you want to delete and then click Delete .
  3. In the dialog, type the project ID and then click Shut down to delete the project.

Deleting the Filestore instance

  1. In the Cloud Console, go to the Filestore Instances page.

    Go to the 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.

Deleting the Compute Engine instance

  1. In the Cloud Console, go to the Filestore Instances page.

    Go to the VM instances page

  2. Select the checkbox next to the nfs-client instance name.

  3. Click Delete .

  4. When prompted, click Delete again.

What's next

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