Create a Filestore instance by using the Google Cloud console

This quickstart shows you how to perform basic operations in Filestore using this Google 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 Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project .

  4. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  5. Verify that billing is enabled for your Google Cloud project .

When you finish the tasks that are described in this document, you can avoid continued billing by deleting the resources that you created. For more information, see Clean up .

Create a Compute Engine VM instance to be the client

  1. In the Google Cloud console, go to the VM Instances page.

    Go to the Compute Engine instances page

  2. Click Create Instanceand configure the instance as follows.

    • Set Nameto nfs-client .
    • Set Zoneto us-central1-c.
    • Keep the default boot disk.
    • In the Firewallsection, select the Allow HTTP trafficcheckbox.
    • Keep the network as default.
  3. Click Createto create the instance.

Create a Filestore instance

This quickstart shows how to create an instance in the Regionaltier with custom performance enabled. For details on creating instances, see create an instance .

  1. In the Google Cloud console, go to the Filestore Instancespage.

    Go to the Filestore Instances page

  2. Click Create Instanceand configure the instance as follows:

    • Set Instance IDto nfs-server .
    • Set Instance typeto Regional.
    • In Capacity, enter 1 TiB .
    • In Performance, click the Custom performancetoggle to enable custom performance. By default, you get 12,000 IOPS in the Performancefield. The Scale performance with capacitycheckbox is checked, so if you change the value in the Capacityfield, performance scales accordingly. For details on configuration options, see configure performance .

    • Set Regionto us-central1.

    • Set VPC networkto default.

    • Set File share nameto vol1 .

    • Set Allocated IP rangeto Use an automatically allocated IP range.

    • Set Access controlsto Grant access to all clients.

  3. Click Create.

Mount the Filestore file share on the client

  1. In the Google Cloud console, go to the VM Instances page.

    Go to the VM instances page

  2. In the list of VM instances, click the SSHbutton for nfs-clientto 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-clientinstance, 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 on this page, follow these steps.

Delete the Google Cloud project

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  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.

Delete the Filestore instance

  1. In the Google 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.

Delete the Compute Engine instance

  1. In the Google 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 Deleteagain.

What's next

Create a Mobile Website
View Site in Mobile | Classic
Share by: