Creating Instances

Use this topic to learn how to create a Cloud Filestore instance by using either the Google Cloud Platform 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.

GCP console

  1. 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 location.
  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 GCP region and zone in which to create the instance. For more information about GCP regions and zones, see Geography and Regions.
  6. For Authorized network, choose the VPC network you want the instance to use.

    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 GCP console. You can get the reserved IP address range for any Cloud Filestore instance on 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 Fileshare name, type a name for the NFS fileshare that is served from the instance. The fileshare 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 fileshare name must be between 1 and 16 characters in length.
  11. For Fileshare size choose the size you want for the fileshare. The minimum fileshare size is 1 terabyte (TB) for a Standard tier instance and 2.5 TB for a Premium tier instance. The maximum fileshare size is 63.9 TB. To see your available quota, go to the Quotas page.

    You can specify the fileshare 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] \
    --location=[LOCATION] \
    --tier=[TIER] \
    --file-share=name="[FILESHARE_NAME]",capacity=[FILESHARE_SIZE] \
    --network=name="[VPC_NETWORK]",reserved-ip-range="[RESERVED_IP_ADDRESS]"

where the parameters are as follows:

  • [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 location.
  • [PROJECT_ID] is the ID of the GCP 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.
  • [LOCATION] is the GCP zone in which to create the instance. Run the gcloud filestore locations list command to get a list of supported locations. You can skip this flag if you have set the gcloud default location by running the gcloud config set filestore/location 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.

  • [FILESHARE_NAME] is the name you specify for the NFS fileshare that is served from the instance. The fileshare 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 fileshare name must be between 1 and 16 characters in length.
  • [FILESHARE_SIZE] is the size you want for the fileshare. The minimum fileshare size is 1 terabyte (TB) for a Standard tier instance and 2.5 TB for a Premium tier instance. The maximum fileshare size is 63.9 TB. To see your available quota, go to the Quotas page.

    You can specify the fileshare 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 GCP project you specified with [PROJECT_NAME].

    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 GCP console. You can get the reserved IP address range for any Cloud Filestore instance on 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.
  • Fileshare name is NFSvol.
  • Fileshare 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 \
    --location=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

هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

Cloud Filestore Documentation