Cloud Filestore is a managed file storage service for applications that require a file system interface and a shared filesystem for data. Filestore gives users a simple, native experience for standing up managed Network Attached Storage (NAS) with their Compute Engine and Google Kubernetes Engine instances. The ability to fine-tune Filestore’s performance and capacity independently leads to predictably fast performance for your file-based workloads.
What you'll do
In this lab you'll learn how to perform basic operations in Cloud Filestore using the Google Cloud console. You will:
Create a Cloud Filestore instance.
Mount the file share from that instance on a client VM instance.
Create a file on the mounted file share.
Setup and requirements
Before you click the Start Lab button
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.
How to start your lab and sign in to the Google Cloud console
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method.
On the left is the Lab Details pane with the following:
The Open Google Cloud console button
Time remaining
The temporary credentials that you must use for this lab
Other information, if needed, to step through this lab
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
Note: If you see the Choose an account dialog, click Use Another Account.
If necessary, copy the Username below and paste it into the Sign in dialog.
{{{user_0.username | "Username"}}}
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
{{{user_0.password | "Password"}}}
You can also find the Password in the Lab Details pane.
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials.
Note: Using your own Google Cloud account for this lab may incur extra charges.
Click through the subsequent pages:
Accept the terms and conditions.
Do not add recovery options or two-factor authentication (because this is a temporary account).
Do not sign up for free trials.
After a few moments, the Google Cloud console opens in this tab.
Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field.
Cloud Filestore architecture
Cloud Filestore architectural choices that affect your Cloud Filestore instances:
Permissions
A Cloud Filestore instance consists of a single NFS file share with fixed export settings and default Unix permissions.
Networking
You must create a Cloud Filestore instance in the same Google Cloud project and VPC network as any clients that connect to it. All internal IP addresses in the selected VPC network can connect to the Cloud Filestore instance.
If you are using a VPC network other than the default network, you might need to create firewall rules to enable communication with Cloud Filestore instances.
You can't use a legacy network with Cloud Filestore instances.
IP address range
Each Cloud Filestore instance must have an IP address range associated with it. The IP address range must be from within the internal IP address ranges (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) and have a block size of 29. Examples of valid Cloud Filestore instance IP address ranges are 10.0.3.0/29 and 172.31.0.0/29.
You can assign the IP address range if there's a specific one you want to use, otherwise Cloud Filestore picks a random range to use from within the internal IP address ranges. If the range is already in use, the service tries again until it finds one that is free. If you assign an IP address range, make sure it doesn't overlap with any existing subnets in the VPC network that the Cloud Filestore instance uses, or with the IP address ranges assigned to any other existing Cloud Filestore instances in that network.
Cloud Filestore network peering
The first time you create a Cloud Filestore instance, Cloud Filestore also creates a peered network to enable network connectivity between clients in your project and the Cloud Filestore instance. The peered network has a machine-generated name similar to r-1abc2d3e-45fg-6789-hf12-3456i78j9k1-0000000a-peer, and appears in the VPC Network Peering page.
Don't delete the peered network, because this will cause you to lose connectivity with your Cloud Filestore instances. If you accidentally delete the peered network, the easiest thing to do to recreate it is to create another Cloud Filestore instance. Cloud Filestore will recognize that there is no connectivity between your project and the new instance, and will re-create the peered network. you can delete the new Cloud Filestore instance after that if you don't need it for anything else.
Storage size units
Cloud Filestore defines 1 gigabyte (GB) as 1024^3 bytes, also known as a GiB. Cloud Filestore also defines 1 TB as 1024^4 bytes, also known as a TiB.
Task 1. Create a Compute Engine instance
In the Cloud Console, select Navigation menu > Compute Engine > VM instances.
To create a new instance, click Create Instance.
In the Machine configuration.
Select the following values:
Property
Value (type value or select option as specified)
Name
nfs-client
Region
Zone
Series
E2
Machine Type
e2-medium
Click OS and storage.
Click Change to begin configuring your boot disk and select the following values:
Operating system: Debian
Version: Debian GNU/Linux 11 (bullseye)
Click Select.
Click Networking.
Firewall: Allow HTTP traffic
Click Create.
Click Check my progress to verify the objective.
Create a Compute Engine instance, allow HTTP traffic.
Task 2. Create a Cloud Filestore instance
In the Cloud console, on the Navigation menu (), click APIs and Services > Library.
Search for Cloud Filestore API and click Enable if it is not already enabled.
In the Cloud console, on the Navigation menu (), click View All Products > Storage > Filestore.
If you get an error message be sure you navigated to Filestore and not Firestore.
Click +CREATE INSTANCE at the top of the page.
Create your Cloud Filestore instance with the following information:
Configuration
Value
Instance ID
nfs-server
Instance type
Basic
Storage type
HDD
Allocate capacity
1 TB
Region
Zone
Network
default
File share name
vol1
Access control
Grant access to all clients on the VPC network
Click Create.
Click Check my progress to verify the objective.
Create a Cloud Filestore instance
This will take a couple of minutes to create.
Task 3. Mount the Cloud Filestore file share on a Compute Engine VM
In the Cloud console, on the Navigation menu (), click Compute Engine > VM Instances.
In the list of VM instances, click the SSH button for nfs-client to open a terminal window connected to that instance.
If prompted, click Authorize.
In SSH shell install NFS by running the following commands:
Make a mount directory for the Cloud Filestore file share by running the following command:
sudo mkdir /mnt/test
Mount the file share by running the mount command and specifying the Cloud Filestore instance IP address and file share name:
sudo mount YOUR_INSTANCE_IP:/vol1 /mnt/test
If the above command hangs up or returns an "access denied" error that resembles:
mount.nfs: access denied by server while mounting 10.0.0.2:/vol1
mount.nfs: mount to NFS server '10.0.0.2:/vol1' failed: RPC Error: Unable to receive try running the command again.
Most likely it means that your Filestore instance hasn't been created yet. Return to the Cloud Console, and from the Navigation menu, select Filestore. This will take you to the instances page. When your instance has a green check next to it you can return to your SSH session and try the sudo mount command again.
Make the file share accessible by changing the permissions:
sudo chmod go+rw /mnt/test
Note: You should set more specific permissions in a production environment. For more information, refer to Configuring access on a file share.
Task 4. Create a file on the file share
In the terminal window that is connected to the nfs-client instance, run the following to create a file named testfile:
echo 'This is a test' > /mnt/test/testfile
Confirm the file was created by running the following command:
ls /mnt/test
You'll see that testfile is in the directory.
You can see the content of the file by running the following command:
nano /mnt/test/testfile
You should see that the file contains the following text:
This is a test
Congratulations!
Next steps / Learn more
You can read more about Cloud Filestore on the Filestore page.
This lab is also part of a series of labs called Qwik Starts. These labs are designed to give you a little taste of the many features available with Google Cloud. Search for "Qwik Starts" in the lab catalog to find the next lab you'd like to take!
Google Cloud training and certification
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated: December 12, 2024
Lab Last Tested November 6, 2024
Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
Lab membuat project dan resource Google Cloud untuk jangka waktu tertentu
Lab memiliki batas waktu dan tidak memiliki fitur jeda. Jika lab diakhiri, Anda harus memulainya lagi dari awal.
Di kiri atas layar, klik Start lab untuk memulai
Gunakan penjelajahan rahasia
Salin Nama Pengguna dan Sandi yang diberikan untuk lab tersebut
Klik Open console dalam mode pribadi
Login ke Konsol
Login menggunakan kredensial lab Anda. Menggunakan kredensial lain mungkin menyebabkan error atau dikenai biaya.
Setujui persyaratan, dan lewati halaman resource pemulihan
Jangan klik End lab kecuali jika Anda sudah menyelesaikan lab atau ingin mengulanginya, karena tindakan ini akan menghapus pekerjaan Anda dan menghapus project
Konten ini tidak tersedia untuk saat ini
Kami akan memberi tahu Anda melalui email saat konten tersedia
Bagus!
Kami akan menghubungi Anda melalui email saat konten tersedia
Satu lab dalam satu waktu
Konfirmasi untuk mengakhiri semua lab yang ada dan memulai lab ini
Gunakan penjelajahan rahasia untuk menjalankan lab
Gunakan jendela Samaran atau browser pribadi untuk menjalankan lab ini. Langkah ini akan mencegah konflik antara akun pribadi Anda dan akun Siswa yang dapat menyebabkan tagihan ekstra pada akun pribadi Anda.
Cloud Filestore is a managed file storage service for applications that require a filesystem interface and a shared filesystem for data. Filestore gives users a simple, native experience for standing up managed Network Attached Storage (NAS) with their Google Compute Engine and Kubernetes Engine instances.