Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Filestore-Instanz mit der Google Cloud Console erstellen
In dieser Kurzanleitung erfahren Sie, wie Sie mit dieser Google Cloud Console grundlegende Vorgänge in Filestore ausführen. Dabei führen Sie die folgenden Vorgänge aus:
Filestore-Instanz erstellen
Stellen Sie die Dateifreigabe dieser Instanz auf einer Client-VM-Instanz bereit.
Erstellen Sie eine Datei in der bereitgestellten Dateifreigabe.
Löschen Sie die Filestore-Instanz.
Hinweise
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.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Nach Abschluss der in diesem Dokument beschriebenen Aufgaben können Sie weitere Kosten vermeiden, indem Sie die erstellten Ressourcen löschen. Weitere Informationen finden Sie unter Bereinigen.
Compute Engine-VM-Instanz erstellen, die als Client dient
Rufen Sie in der Google Cloud Console die Seite „VM-Instanzen“ auf.
Klicken Sie auf Instanz erstellen und konfigurieren Sie die Instanz wie folgt.
Legen Sie als Namenfs-client fest.
Setzen Sie Zone auf us-central1-c.
Behalten Sie das Standard-Bootlaufwerk bei.
Klicken Sie im Bereich Firewall das Kästchen HTTP-Traffic zulassen an.
Behalten Sie das Netzwerk default bei.
Klicken Sie auf Erstellen, um die Instanz zu erstellen.
Filestore-Instanz erstellen
In dieser Kurzanleitung wird gezeigt, wie Sie eine Instanz in der Regional-Stufe mit aktivierter benutzerdefinierter Leistung erstellen. Weitere Informationen zum Erstellen von Instanzen finden Sie unter Instanz erstellen.
Rufen Sie in der Google Cloud Console die Filestore-Seite Instanzen auf.
Klicken Sie auf Instanz erstellen und konfigurieren Sie die Instanz wie folgt.
Legen Sie als Instanz-IDnfs-server fest.
Legen Sie Instanztyp auf Regional fest.
Geben Sie unter Kapazität den Wert 1 TiB ein.
Klicken Sie unter Leistung auf die Ein/Aus-Schaltfläche Benutzerdefinierte Leistung, um die benutzerdefinierte Leistung zu aktivieren. Standardmäßig werden im Feld Leistung 12.000 IOPS angezeigt. Das Kästchen Leistung kapazitätsabhängig skalieren ist aktiviert. Wenn Sie also den Wert im Feld Kapazität ändern, wird die Leistung entsprechend skaliert. Weitere Informationen zu den Konfigurationsoptionen finden Sie unter Leistung konfigurieren.
Legen Sie die Region auf us-central1 fest.
Setzen Sie das VPC-Netzwerk auf default.
Legen Sie Fileshare-Name auf vol1 fest.
Setzen Sie Zugewiesener IP-Bereich auf Automatisch zugewiesenen IP-Bereich verwenden.
Setzen Sie Zugriffssteuerungen auf Zugriff auf alle Clients gewähren.
Klicken Sie auf Erstellen.
Filestore-Dateifreigabe auf dem Client bereitstellen
Rufen Sie in der Google Cloud Console die Seite „VM-Instanzen“ auf.
Erstellen Sie ein Bereitstellungsverzeichnis für die Filestore-Dateifreigabe, indem Sie den folgenden Befehl ausführen:
sudo mkdir -p /mnt/test
Stellen Sie die Dateifreigabe bereit, indem Sie den Befehl mount ausführen und die IP-Adresse der Filestore-Instanz und den Namen der Dateifreigabe angeben:
sudo mount 10.0.0.2:/vol1 /mnt/test
Ändern Sie die Berechtigungen, um den Zugriff auf die Dateifreigabe zu ermöglichen:
sudochmodgo+rw/mnt/test
Datei in der Dateifreigabe erstellen
Erstellen Sie in dem mit der Instanz nfs-client verbundenen Terminalfenster eine Datei mit dem Namen testfile. Führen Sie dazu den folgenden Befehl aus:
echo 'This is a test' > /mnt/test/testfile
Bestätigen Sie mit dem folgenden Befehl, dass die Datei erstellt wurde.
ls /mnt/test
und prüfen, ob testfile aufgeführt ist.
Bereinigen
Mit den folgenden Schritten vermeiden Sie, dass Ihrem Google Cloud -Konto die auf dieser Seite verwendeten Ressourcen in Rechnung gestellt werden:
Google Cloud -Projekt löschen
In the Google Cloud console, go to the Manage resources page.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-18 (UTC)."],[[["\u003cp\u003eThis guide demonstrates creating a Filestore instance, which involves setting instance details like ID, type, capacity, region, and network.\u003c/p\u003e\n"],["\u003cp\u003eIt walks through mounting the Filestore file share onto a Compute Engine VM, including installing NFS and setting up the mount directory.\u003c/p\u003e\n"],["\u003cp\u003eThe guide illustrates how to create a test file within the mounted file share on the client VM.\u003c/p\u003e\n"],["\u003cp\u003eThe document covers cleaning up, detailing how to delete both the Filestore and the Compute Engine instance, as well as the entire Google Cloud project if necessary.\u003c/p\u003e\n"],["\u003cp\u003eThis guide provides additional links to the Filestore Overview, creating instances, access controls, copying data, and transferring data from cloud storage.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Create a Filestore instance by using the Google Cloud console\n\nCreate a Filestore instance by using the Google Cloud console\n=============================================================\n\nThis quickstart shows you how to perform basic operations in Filestore\nusing this Google Cloud console. In the quickstart, you will:\n\n- Create a Filestore instance.\n- Mount the file share from that instance on a client VM instance.\n- Create a file on the mounted file share.\n- Delete the Filestore instance.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n\u003cbr /\u003e\n\n| **Important:** If you choose to use an existing project with this quickstart, it must have a non-legacy default VPC network with unmodified firewall rules. Production Filestore instances can have other network configurations, see [Networking](/filestore/docs/networking) for more information.\n\nWhen you finish the tasks that are described in this document, you can avoid\ncontinued billing by deleting the resources that you created. For more information, see\n[Clean up](#clean-up).\n\nCreate a Compute Engine VM instance to be the client\n----------------------------------------------------\n\n1. In the Google Cloud console, go to the VM Instances page.\n\n [Go to the Compute Engine instances page](https://console.cloud.google.com/compute/instances)\n2. Click **Create Instance** and configure the instance as follows.\n\n - Set **Name** to `nfs-client`.\n - Set **Zone** to **us-central1-c**.\n - Keep the default boot disk.\n - In the **Firewall** section, select the **Allow HTTP traffic** checkbox.\n - Keep the network as **default**.\n3. Click **Create** to create the instance.\n\nCreate a Filestore instance\n---------------------------\n\nThis quickstart shows how to create an instance in the **Regional** tier with custom performance enabled. For details on creating instances, see [create an instance](/filestore/docs/creating-instances).\n\n1. In the Google Cloud console, go to the Filestore **Instances** page.\n\n [Go to the Filestore Instances page](https://console.cloud.google.com/filestore/instances)\n2. Click **Create Instance** and configure the instance as follows:\n\n - Set **Instance ID** to `nfs-server`.\n - Set **Instance type** to **Regional**.\n - In **Capacity** , enter `1 TiB`.\n - In **Performance** , click the **Custom performance** toggle to enable custom performance. By default, you get 12,000 IOPS in the **Performance** field. The **Scale performance with capacity** checkbox is checked, so if you change the value in the **Capacity** field, performance scales accordingly. For details on configuration options, see [configure performance](/filestore/docs/creating-instances#configure-performance).\n\n | **Note:** After activating custom performance for an instance you can't deactivate it for that instance. Instances with activated custom performance are billed according to purchased IOPS. For details, see [configure custom performance](/filestore/docs/custom-performance#enable-custom-performance) and [Filestore pricing](/filestore/pricing).\n - Set **Region** to **us-central1**.\n\n - Set **VPC network** to **default**.\n\n - Set **File share name** to `vol1`.\n\n - Set **Allocated IP range** to **Use an automatically allocated IP range**.\n\n - Set **Access controls** to **Grant access to all clients**.\n\n3. Click **Create**.\n\nMount the Filestore file share on the client\n--------------------------------------------\n\n1. In the Google Cloud console, go to the VM Instances page.\n\n [Go to the VM instances page](https://console.cloud.google.com/compute/instances)\n2. In the list of VM instances, click the **SSH** button for **nfs-client** to\n open a terminal window connected to that instance.\n\n3. Install NFS by running the following commands:\n\n sudo apt-get -y update &&\n sudo apt-get -y install nfs-common\n\n4. Make a mount directory for the Filestore file share by running the following command:\n\n sudo mkdir -p /mnt/test\n\n5. Mount the file share by running the `mount` command\n and specifying the Filestore instance IP address and\n file share name:\n\n sudo mount 10.0.0.2:/vol1 /mnt/test\n\n6. Make the file share accessible by changing the permissions:\n\n sudo chmod go+rw /mnt/test\n\n | **Important:** We recommend setting more specific permissions in a production environment. For more information, see [Configuring access on a file share](/filestore/docs/access-control#fileshare-access).\n\nCreate a file on the file share\n-------------------------------\n\n1. In the terminal window that is connected to the **nfs-client** instance, create a file\n named `testfile` by running the following command:\n\n echo 'This is a test' \u003e /mnt/test/testfile\n\n2. Confirm that the file was created by running the following command:\n\n ls /mnt/test\n\n and verifying that `testfile` is listed.\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n### Delete the Google Cloud project\n\n| **Caution** : Deleting a project has the following effects:\n|\n| - **Everything in the project is deleted.** If you used an existing project for the tasks in this document, when you delete it, you also delete any other work you've done in the project.\n| - **Custom project IDs are lost.** When you created this project, you might have created a custom project ID that you want to use in the future. To preserve the URLs that use the project ID, such as an `appspot.com` URL, delete selected resources inside the project instead of deleting the whole project.\n|\n|\n| If you plan to explore multiple architectures, tutorials, or quickstarts, reusing projects\n| can help you avoid exceeding project quota limits.\n1. In the Google Cloud console, go to the **Manage resources** page.\n\n [Go to Manage resources](https://console.cloud.google.com/iam-admin/projects)\n2. In the project list, select the project that you want to delete, and then click **Delete**.\n3. In the dialog, type the project ID, and then click **Shut down** to delete the project.\n\n\u003cbr /\u003e\n\n### Delete the Filestore instance\n\n1. In the Google Cloud console, go to the Filestore Instances page.\n\n [Go to the Filestore instances page](https://console.cloud.google.com/filestore/instances)\n2. Click the **`nfs-server`** instance ID to open the instance details page.\n\n3. Click **Delete** *delete*.\n\n4. When prompted, type the instance ID.\n\n5. Click **Delete**.\n\n### Delete the Compute Engine instance\n\n1. In the Google Cloud console, go to the Filestore Instances page.\n\n [Go to the VM instances page](https://console.cloud.google.com/compute/instances)\n2. Select the checkbox next to the **`nfs-client`** instance name.\n\n3. Click **Delete** *delete*.\n\n4. When prompted, click **Delete** again.\n\nWhat's next\n-----------\n\n- Read the [Filestore Overview](/filestore/docs/overview) to learn more about the basics of Filestore.\n- Set up a Filestore instance on your own by following the instructions at [Creating Instances](/filestore/docs/creating-instances).\n- Read the [Access Control](/filestore/docs/access-control) page to learn how to control access to Filestore operations and the resources on an instance.\n- See how to [copy data to or from a Filestore instance](/filestore/docs/copying-data).\n- See how to [transfer large datasets from Cloud Storage to Filestore](/filestore/docs/transfer-data-from-gcs)."]]