Creating instances

Use this topic to learn how to create a Cloud Filestore instance by using either the Google Cloud console or the gcloud command-line tool.

Before you begin

If you want to use the command-line examples in this topic, enable the gcloud command-line tool by installing the Cloud SDK.

Creating an instance

Use one of the following procedures to create a Cloud Filestore instance.

Console

  1. In the Cloud Console, go to the Filestore instances page.

    Go to the Cloud Filestore instances page

  2. Click Create Instance.

  3. For Instance ID, type a name for the instance. The instance ID can contain lowercase letters, numbers and dashes. It must start with a lowercase letter, and the last character can't be a dash. The instance ID must be between 1 and 63 characters in length, and must be unique within the project and zone.

  4. For Instance tier, choose the Cloud Filestore service tier you want to use. Select Standard for moderate performance or Premium for higher performance. See Tiers for more information.

  5. For Region and Zone, choose the Google Cloud region and zone in which to create the instance. For more information about Google Cloud regions and zones, see Geography and regions.

  6. For Authorized network, choose the network you want the instance to use. If you are using a shared VPC service project, you cannot directly create Cloud Filestore instances on the shared VPC network. For details, see Known issues.

    If the applications you plan to use with this Cloud Filestore instance require NFS file locking, and you are choosing either of the following:

    • A VPC network other than the default network.
    • The default VPC network with changed firewall rules.

    Then you might need to create firewall rules in the network you choose. For more information, see Configuring firewall rules.

  7. Optional: If you want to provide a description of the instance, click Show advanced options and type a description of the instance in Description.

  8. Optional: If you want to provide a specific IP address range for the instance to use, click Show advanced options and type an IP address range in CIDR notation in Reserved address range.

    The IP address range must be a subset of one of the internal IP address ranges (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) with a block size of 29. The IP address range you choose must not overlap with any existing subnets from the selected VPC network, or with the reserved IP address ranges for any existing Cloud Filestore instances in that network.

    You can see the IP address ranges for the subnets of your network by going to the VPC Network page in the Google Cloud console:

    Go to the VPC network page

    You can get the reserved IP address range for any Cloud Filestore instance on the Cloud Filestore instances page in the Google Cloud console:

    Go to the Cloud Filestore instances page

    Examples of valid Cloud Filestore instance IP address ranges are 10.0.0.0/29 and 172.16.1.0/29.

    If you don't assign a specific IP address range, Cloud Filestore automatically finds a free IP address range and assigns it to the instance.

  9. Click Continue.

  10. For File share name, type a name for the NFS file share that is served from the instance. The file share name can be composed of uppercase letters, lowercase letters, numbers and underscores. It must start with a letter, and the last character can't be an underscore. The file share name must be between 1 and 16 characters in length.

  11. For File share size choose the size you want for the file share. The minimum file share size is 1 terabyte (TB) for a Standard tier instance and 2.5 TB for a Premium tier instance. The maximum file share size is 63.9 TB.

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

    Go to the Quotas page

    You can specify the file share size in whole numbers using either gigabytes or terabytes. The default unit is gigabytes.

  12. Click Create.

gcloud

Create an instance by running the instances create command, replacing [VALUES_IN_BRACKETS] with the appropriate values:

gcloud filestore instances create instance-id \
    --project=project-id \
    --zone=zone \
    --tier=tier \
    --file-share=name="file-share-name",capacity=file-share-size \
    --network=name="vpc-network",reserved-ip-range="reserved-ip-address"

where:

  • instance-id is the identifier you specify for the instance. The instance ID can contain lowercase letters, numbers and dashes. It must start with a lowercase letter, and the last character can't be a dash. The instance ID must be between 1 and 63 characters in length, and must be unique within the project and zone.
  • project-id is the ID of the Google Cloud project in which to create the instance. You can skip this flag if you have set the gcloud default project and want to use that.
  • zone is the Google Cloud zone in which to create the instance. Run the gCloud Filestore zones list command to get a list of supported zones. You can skip this flag if you have set the gcloud default zone by running the gcloud config set filestore/zone command.
  • tier is the Cloud Filestore service tier you want to use. Specify the STANDARD tier for moderate performance and the PREMIUM tier for higher performance. See Tiers for more information.
  • file-share-name is the name you specify for the NFS file share that is served from the instance. The file share name can be composed of uppercase letters, lowercase letters, numbers and underscores. It must start with a letter, and the last character can't be an underscore. The file share name must be between 1 and 16 characters in length.
  • file-share-size is the size you want for the file share. The minimum file share size is 1 terabyte (TB) for a Standard tier instance and 2.5 TB for a Premium tier instance. The maximum file share size is 63.9 TB. To see your available quota, go to the Quotas page in the Google Cloud console:

    Go to the Quotas page

    You can specify the file share size in whole numbers using either gigabytes or terabytes. The default unit is gigabytes.

  • vpc-network is the name of the VPC network you want the instance to use. This must be one of the networks in the Google Cloud project you specified with project-name. If you are using a shared VPC service project, you cannot directly create Cloud Filestore instances on the shared VPC network. For details, see Known issues.

    If the applications you plan to use with this Cloud Filestore instance require NFS file locking, and you are choosing either of the following:

    • A VPC network other than the default network.
    • The default VPC network with changed firewall rules.

    then you might need to create firewall rules in the network you choose. For more information, see Configuring firewall rules.

    You can't specify a legacy network for the vpc-network value. If necessary, create a new VPC network to use by following the instructions at Creating a new auto mode VPC network.

  • reserved-ip-address is the IP address range for the Cloud Filestore instance.

    If you skip this flag, Cloud Filestore automatically finds a free IP address range and assigns it to the instance.

    Otherwise, using CIDR notation, specify the IP address range you want the instance to use. The IP address range must be a subset of one of the internal IP address ranges (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16) with a block size of 29. The IP address range you choose must not overlap with any existing subnets from the selected VPC network, or with the reserved IP address ranges for any existing Cloud Filestore instances in that network.

    You can see the IP address ranges for the subnets of your network by going to the VPC Network page in the Google Cloud console:

    Go to the VPC network page

    You can get the reserved IP address range for any Cloud Filestore instance on the Cloud Filestore instances page in the Google Cloud console:

    Go to the Cloud Filestore instances page

    Examples of valid Cloud Filestore instance IP address ranges are 10.0.0.0/29 and 172.16.1.0/29.

Example

The following command creates an instance with the following characteristics:

  • ID is render1.
  • Project is myproject.
  • Zone is us-central1-c.
  • Tier is STANDARD.
  • File share name is NFSvol.
  • File share size is 2 TB.
  • VPC network is default.
  • Reserved IP address range is 10.0.7.0/29.
gcloud filestore instances create render1 \
    --project=myproject \
    --zone=us-central1-c \
    --tier=STANDARD \
    --file-share=name="NFSvol",capacity=2TB \
    --network=name="default",reserved-ip-range="10.0.7.0/29"

What's next

Czy ta strona była pomocna? Podziel się z nami swoją opinią:

Wyślij opinię na temat...