Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Criar uma instância do Filestore usando o console Google Cloud
Neste guia de início rápido, mostramos como executar operações básicas no Filestore
usando este console Google Cloud . No início rápido, você vai:
Criar uma instância do Filestore.
Ativar o compartilhamento de arquivos dessa instância em uma instância de VM do cliente.
Criar um arquivo no compartilhamento de arquivos ativado.
Excluir a instância do Filestore.
Antes de começar
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.
Clique em Criar instância e configure a instância da seguinte maneira.
Defina o Nome como nfs-client.
Defina a Zona como us-central1-c.
Mantenha o disco de inicialização padrão.
Na seção Firewall, marque a caixa de seleção Permitir tráfego HTTP.
Mantenha a rede como default.
Clique em Criar para criar a instância.
Criar uma instância do Filestore
Neste guia de início rápido, mostramos como criar uma instância no nível Regional com desempenho personalizado ativado. Para detalhes sobre como criar instâncias, consulte Criar uma instância.
No console Google Cloud , acesse a página Instâncias do Filestore.
Clique em Criar instância e configure a instância da seguinte maneira:
Defina o ID da instância como nfs-server.
Defina o Tipo de instância como Regional.
Em Capacidade, insira 1 TiB.
Em Performance, clique no botão Performance personalizada para ativar essa opção. Por padrão, você recebe 12.000 IOPS no campo Performance. A caixa de seleção Escalonar a performance com a capacidade está marcada. Portanto, se você mudar o valor no campo Capacidade, a performance será escalonada de acordo. Para detalhes sobre as opções de configuração, consulte configurar o desempenho.
Defina Região como us-central1.
Defina a Rede VPC como default.
Defina Nome do compartilhamento de arquivos como vol1.
Defina Intervalo de IP alocado como Usar um intervalo de IP alocado automaticamente.
Defina Controles de acesso como Conceder acesso a todos os clientes.
Clique em Criar
Ativar o compartilhamento de arquivos do Filestore no cliente
No console Google Cloud , acesse a página "Instâncias de VM".
Crie um diretório de ativação para o compartilhamento de arquivos do Filestore executando o seguinte comando:
sudo mkdir -p /mnt/test
Ative o compartilhamento de arquivos executando o comando mount
e especificando o endereço IP e
o nome do compartilhamento de arquivos da instância do Filestore:
sudo mount 10.0.0.2:/vol1 /mnt/test
Torne o compartilhamento de arquivos acessível alterando as permissões:
sudochmodgo+rw/mnt/test
Criar um arquivo no compartilhamento de arquivos
Na janela de terminal conectada à instância nfs-client, crie um arquivo chamado testfile executando o seguinte comando:
echo 'This is a test' > /mnt/test/testfile
Confirme se o arquivo foi criado executando o seguinte comando:
ls /mnt/test
e verificando se testfile está listado.
Limpar
Para evitar cobranças na sua conta do Google Cloud pelos
recursos usados nesta página, siga estas etapas.
Excluir o projeto do Google Cloud
In the Google Cloud console, go to the Manage resources page.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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)."]]