Creating a Mount Target

On Compute Cloud@Customer, A mount target is an NFS endpoint assigned to a subnet of your choice. The mount target provides the IP address or DNS name that's used in the mount command when connecting NFS clients to a file system.

You can create at most two mount targets per VCN: at most one mount target per pool type. Pool type refers to the backing store pool for the file system, which can be either the default pool of the attached ZFS Storage Appliance or a high performance pool. See the Backing store pool in Creating a File System. Two mount targets in a VCN are counted as one with regard to resource limits.

You can reuse a mount target to make many file systems available on the network. To reuse the same mount target for multiple file systems, create an export in the mount target for each file system. The file system and mount target must be in the same compartment and the same backing store pool when you create an export.

Caution

Don't use /30 or smaller subnets for mount target creation because they might not have enough available IP addresses.

Important

When exporting file systems to overlapping CIDRs in a VCN, exports to the longest CIDR (smallest network) must be done first. For more information and an example, see My Oracle Support article PCA File system as a Service Exports (Doc ID 2823994.1).

Before you can create a mount target, ensure that these items are configured:

Avoid entering confidential information in names and tags.

    1. In the Compute Cloud@Customer Console navigation menu, click File Storage, then click Mount Targets.

    2. In the compartment drop-down menu above the mount targets list, select the compartment where you plan to create the file system.

      If a mount target is listed, click the name of the mount target to open the details page and check the following parameters:

      • The mount target must be on the same subnet as the instance where you want to mount the file system.

      • Click the Tags tab. The mount target must be in the same backing store pool that's specified for the file system. If the value of the OraclePCA.poolName tag is PCA_POOL_HIGH, then the mount target is in the high performance pool. If the value of the OraclePCA.poolName tag is PCA_POOL, or if no OraclePCA.poolName tag, then the mount target is in the default pool of the attached ZFS Storage Appliance. For more information about these tags, see Creating OraclePCA Tags.

      If the mount target meets your needs, skip this procedure and go to Creating a File System.

    3. Click Create Mount Target.

    4. Enter the mount target information:

      • Name: It doesn't have to be unique. An Oracle Cloud Identifier (OCID) uniquely identifies the mount target. Avoid entering confidential information.

        Note

        The mount target name is different than the DNS hostname.

      • Create in Compartment: Specify the compartment.

      • VCN: Select the VCN where you want to create the new mount target.

      • Subnet: Select a subnet to attach the mount target to.

      • IP Address: (Optional) You can specify an unused IP address in the subnet you selected for the mount target. If left blank, an IP address is automatically assigned.

      • Host Name: (Optional) You can specify a hostname you want to assign to the mount target.

        Note

        The File Storage service constructs a fully qualified domain name (FQDN) by combining the hostname with the FQDN of the mount target subnet.

        For example, myhostname.subnet123.dnslabel.examplevcn.com.

      • Enable Network Security Groups: Select this option to add this mount target to an existing NSG.

        Important

        Rules for the NSG that you select must be configured to allow traffic to the mount target's VNIC using specific protocols and ports. For more information, seeControlling Access to File Storage and Configuring VCN Security Rules for File Storage.

      • Tagging: (Optional) Add one or more tags to this resource. Tags can also be applied later. For more information about tagging resources, see Resource Tags.

        By default, the mount target is for the default pool of the attached ZFS Storage Appliance. To create a mount target for a high performance pool, select the OraclePCA tag namespace, the poolName tag key, and the value PCA_POOL_HIGH. The poolName property can be set only when the mount target is created. You can't set or change this property value after the mount target is created.

    5. Click Create Mount Target.

      Next, create a file system. See Creating a File System.

  • Use the oci fs mount-target create command and required parameters to create a new mount target in the specified compartment and subnet.

    oci fs mount-target create --availability-domain <availability_domain_name> --compartment-id <compartment_OCID>--subnet-id <subnet_OCID> --display-name <name_to_assign_to_mount-target> [OPTIONS]

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

    Procedure

    1. Gather the information that you need to run the command:

      • OCID of the compartment where you plan to create the file system (oci iam compartment list)

      • OCID of the subnet of the instance where you want to mount a file system (oci network subnet list)

    2. Run the create mount target command.

      By default, the mount target is for the default pool of the attached ZFS Storage Appliance. To create a mount target for a high performance pool, specify the OraclePCA.poolName tag with a value of PCA_POOL_HIGH as shown in the following example. The poolName property can be set only when the mount target is created. You can't set or change this property value with the update command.

      Example:

      oci fs mount-target create --availability-domain AD-1 \
      --compartment-id ocid1.compartment.uniqueID --subnet-id ocid1.subnet.uniqueID \
      --defined-tags '{"OraclePCA":{"poolName":"PCA_POOL_HIGH"}}' \
      --display-name HighPerfPoolMT
      {
        "data": {
          "availability-domain": "AD-1",
          "compartment-id": "ocid1.compartment.uniqueID",
          "defined-tags": {
            "Oracle-Tags": {
              "CreatedBy": "pca_user",
              "CreatedOn": "2024-07-03T14:56:29.92Z"
            },
            "OraclePCA":{
              "poolName":"PCA_POOL_HIGH"
            }
          },
          "display-name": "HighPerfPoolMT",
          "export-set-id": "ocid1.exportset.uniqueID",
          "freeform-tags": {},
          "id": "ocid1.mounttarget.uniqueID",
          "lifecycle-details": null,
          "lifecycle-state": "CREATING",
          "nsg-ids": [],
          "private-ip-ids": [],
          "subnet-id": "ocid1.subnet.uniqueID",
          "time-created": "2024-07-03T14:56:29.921587+00:00"
        },
        "etag": "2d278b37-a74a-4fec-b74a-fd9e9a1c72de"
    3. Next, create a file system. See Creating a File System.

  • Use the CreateMountTarget operation to create a new mount target in the specified compartment and subnet.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.