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 only create one mount target per VCN. If a mount target is already created in the VCN you want to use, don't create a new mount target. Instead, use the mount target that's already available.

You can reuse the same 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.

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 Target.

      If a mount target is listed, you can use the existing mount target if it's on the subnet you're planning to assign the mount target. Click the mount target name to see the details. If the mount target meets your needs, skip this procedure and go to Creating a File System.

    2. Click Create Mount Target.

    3. 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.

      • Enable Network Security Groups: Select this option to add this mount target to an NSG you've created.

        Important

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

      • IP Address: Optionally, 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.

      • Hostname: Optionally, 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.

      • Tagging: (Optional) Add one or more tags to this resource. If you aren't sure whether to apply tags, skip this option (you can apply tags later). For more information about tagging resources, see Resource Tags.

    4. 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.

  • 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.