Edit instances

This page shows you how to edit a Filestore instance using either the Google Cloud console or the gcloud CLI.

Once created, you can modify a Filestore instance in the following ways:

For details on scaling capacity, see Scale capacity.

Instructions for editing an instance

Google Cloud console

To edit Filestore instances using the Google Cloud console, navigate to the Edit instance page, where you can edit the instance description, manage IP-based access control rules, and scale the file share performance:

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

    Go to the Filestore instances page

  2. Click the instance ID of the instance you want to edit.

  3. On the Instance details page, click Edit to go to the Edit instance page.

  4. Change the instance description, IP-based access control rules, and capacity as needed. For details, see Creating instances.

  5. Click Save.

gcloud

Before you begin

To use the gcloud CLI, you must either install the gcloud CLI or use the Cloud Shell that's built into the Google Cloud console:

Go to the Google Cloud console

gcloud command for editing an instance

You can edit a Filestore instance by running the instances update command. If you need to update the configuration rules for IP-based access control, you must use the --flags-file flag and specify a JSON configuration file. If you choose this method, you don't need to use the --file-share flag because it is already included in the JSON configuration file.

gcloud filestore instances update instance-id
    --[project="project-id"]
    --[location=location]
    --[file-share=name="file-share-name",capacity=file-share-size]
    --[description="instance-description"]
    --[flags-file=file-name.json]

where:

  • instance-id is the instance ID of the Filestore instance you want to edit.
  • project-id is the project ID of the Google Cloud project that contains the Filestore instance. You can skip this flag if the Filestore instance is in the gcloud default project. You can set the default project by running:

    gcloud config set project project-id
    
  • location is the location where the Filestore instance resides. For enterprise instances, specify a region. For all other instances, specify a zone. Run the gcloud filestore zones list command to get a list of supported zones. You can skip this flag if the Filestore instance is in the gcloud default zone. You can set the default zone by running:

    gcloud config set filestore/zone zone
    
  • file-share-name is the name of the file share that is served from the Filestore instance. File share names cannot be changed after instance creation.

  • file-share-size is the new size you want for the file share. You can specify the file share size in whole numbers using either GiB (default) or TiB.

    To see your available quota, go to the Quotas page in the Google Cloud console:

    Go to the Quotas page

  • instance-description is the optional Filestore instance description.

  • file-name is the name of the json configuration file for IP- based access control.

    Example json configuration file:

     {
    "--file-share":
      {
        "capacity": "4096",
        "name": "my_vol",
        "nfs-export-options": [
          {
            "access-mode": "READ_WRITE",
            "ip-ranges": [
              "10.0.0.0",
              "10.2.0.0"
            ],
            "squash-mode": "ROOT_SQUASH",
            "anon_uid": 1003,
            "anon_gid": 1003
          },
           {
            "access-mode": "READ_ONLY",
            "ip-ranges": [
              "10.0.1.0/28"
            ],
            "squash-mode": "NO_ROOT_SQUASH"
          }
        ],
      }
    }
    

    where:

    • ip-ranges is the IP address or range to grant access to. You can specify multiple IP addresses or ranges by separating them with a comma. Only the following service tiers support configuration settings for overlapping IP address ranges:
    • access-mode is the access level to grant to clients whose IP address falls within ip-range. It can have the values of READ_WRITE or READ_ONLY. The default value is READ_WRITE.
    • squash-mode can have the values ROOT_SQUASH or NO_ROOT_SQUASH. ROOT_SQUASH removes root level access to the clients whose IP address falls within ip-range, while NO_ROOT_SQUASH enables root access. The default value is NO_ROOT_SQUASH.
    • anon_uid is the user ID value that you want to map to anon_uid. The default value is 65534.
    • anon_gid is the group ID value that you want to map to anon_gid. The default value is 65534.
Example

The following example updates the nfs-server instance by increasing the file share size to 3 TiB.

  gcloud filestore instances update nfs-server --zone=us-central1-c --file-share=name="vol1",capacity=3TiB
    ```

What's next