Managing Mount Targets and Exports

A mount target is an NFS endpoint assigned to a VCN subnet of your choice and provides network access for file systems. The mount target provides the IP address or DNS name that is used together with a unique export path to mount the file system.

For an instance to mount a file system, the instance's VCN must have a Mount Target. A VCN can only have one mount target.

You can reuse the same mount target to make as many file systems available on the network as you want. To reuse the same mount target for multiple file systems, create an export in the mount target for each file system.

Important:

When more than one file system is exported to the same mount target, you must export to the mount target with the smallest network (largest CIDR number) first. For detailed information and instructions, refer to My Oracle Support PCA File system as a Service Exports (Doc ID 2823994.1)

For instructions to create a mount target, see Creating a File System, Mount Target, and Export.

For more conceptual information, refer to the File Storage Overview chapter in the Oracle Private Cloud Appliance Concepts Guide.

This section provides instructions for administering mount targets.

Listing Mount Targets and Viewing Details

Using the Compute Web UI

  1. In the navigation menu, under File Storage, click Mount Targets.

  2. Select the compartment where the mount target resides.

    The mount targets are displayed.

  3. To see the mount target details, click the mount target name.

Using the OCI CLI

  • Listing Mount Targets

    1. Get the OCID of the compartment where you want to list mount targets (oci iam compartment list)

    2. Run this command.

      Syntax (entered on a single line):

      oci fs mount-target list 
      --availability-domain AD-1 \
      --compartment-id <compartment_id>

      Example:

      oci fs mount-target list --availability-domain AD-1 \
      --compartment-id ocid1.compartment.uniqueID
      
      {
        "data": [
          {
            "availability-domain": "AD-1",
            "compartment-id": "ocid1.compartment.uniqueID",
            "defined-tags": {},
            "display-name": "MyMountTarget",
            "export-set-id": "ocid1.exportset.uniqueID",
            "freeform-tags": {},
            "id": "ocid1.mounttarget.uniqueID",
            "lifecycle-state": "ACTIVE",
            "nsg-ids": null,
            "private-ip-ids": [
              "ocid1.privateip.uniqueID"
            ],
            "subnet-id": "ocid1.subnet.uniqueID",
            "time-created": "2021-07-16T22:56:57+00:00"
          },
          {
            "availability-domain": "AD-1",
            "compartment-id": "ocid1.compartment.uniqueID",
            "defined-tags": {},
            "display-name": "AnotherMountTarget",
            "export-set-id": "ocid1.exportset.uniqueID",
            "freeform-tags": {},
            "id": "ocid1.mounttarget.uniqueID",
            "lifecycle-state": "ACTIVE",
            "nsg-ids": [],
            "private-ip-ids": [
              "ocid1.privateip.uniqueID"
            ],
            "ocid1.privateip.uniqueID"
            "subnet-id": "ocid1.subnet.uniqueID",
            "time-created": "2021-06-16T22:56:57+00:00"
          }
        ]
      }
  • Getting Mount Target Details

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

      • Mount target ID (oci fs mount-target list)

    2. Run this command.

      Syntax (entered on a single line):

      oci fs mount-target get 
      --mount-target-id <mount_target_OCID>

      Example:

      oci fs mount-target get  \
      --mount-target-id ocid1.mounttarget.….….….uniqueID
      {
        "data": {
            "availability-domain": "AD-1",
            "compartment-id": "ocid1.compartment.uniqueID",
            "defined-tags": {},
            "display-name": "MyMountTarget",
            "export-set-id": "ocid1.exportset.uniqueID",
            "freeform-tags": {},
            "id": "ocid1.mounttarget.uniqueID",
            "lifecycle-state": "ACTIVE",
            "nsg-ids": null,
            "private-ip-ids": [
              "ocid1.privateip.uniqueID"
            ],
            "subnet-id": "ocid1.subnet.uniqueID",
            "time-created": "2021-07-16T22:56:57+00:00"
          }
      }

Changing the Mount Target Name

Using the Compute Web UI

  1. In the navigation menu, under File Storage, click Mount Targets.

  2. Select the compartment where the mount target resides.

  3. Click the Action menu (three dots) for the mount target, and select Edit.

  4. Change the name.

  5. Click Save.

Using the OCI CLI

  1. Get the OCID of the mount target (oci network subnet list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs mount-target update --mount-target-id mount_target_OCID \
    --display-name "New_Mount_Target_Name"

    Example:

    oci fs mount-target update 
    --mount-target-id ocid1.mounttarget.uniqueID \
    --display-name "MyMountTarget"
    
    {
      "data": {
        "availability-domain": "AD-1",
        "compartment-id": "ocid1.compartment.uniqueID",
        "defined-tags": {},
        "display-name": "MyMountTarget",
        "export-set-id": "ocid1.exportset.uniqueID",
        "freeform-tags": {},
        "id": "ocid1.mounttarget.uniqueID",
        "lifecycle-details": null,
        "lifecycle-state": "ACTIVE",
        "nsg-ids": null,
        "private-ip-ids": [
          "ocid1.privateip.uniqueID"
        ],
        "subnet-id": "ocid1.subnet.uniqueID",
        "time-created": "2021-06-17T19:01:37+00:00"
      },
      "etag": "b7efb0d7-d5fb-45d8-8bdd-a4a2f3f0371d"
    }

Listing Exports

Using the Compute Web UI

  1. In the navigation menu, under File Storage, click Mount Targets.

  2. Select the compartment where the mount target resides.

  3. Click the mount target name.

    The exports are display at the bottom of the page.

  4. To see the export details, click the export name.

Using the OCI CLI

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

    • Compartment OCID (oci iam compartment list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs export list
    --compartment-id <compartment_id>

    Example:

    oci fs export list  \
    --compartment-id ocid1.….….….uniqueID
    {
      "data": [
        {
          "export-set-id": "ocid1.exportset.….….….uniqueID",
          "file-system-id": "ocid1.filesystem.….….….uniqueID",
          "id": "ocid1.export.….….….uniqueID-1",
          "lifecycle-state": "ACTIVE",
          "path": "/export/8g0afgj16nuwx77a4wublc3ekkdaekef1bct2zt8qcbukfsconxmkp9su0ys",
          "time-created": "2021-06-17T21:15:44+00:00"
        },
        {
          "export-set-id": "ocid1.exportset.….….….uniqueID",
          "file-system-id": ".….….….uniqueID",
          "id": "ocid1.export.….….….uniqueID-2",
          "lifecycle-state": "ACTIVE",
          "path": "/export/8g0afgj16nuwx77a4wublc3ekkdaekef1bct2zt8qcbukfsconxmkp9su0ys",
          "time-created": "2021-06-17T21:20:55+00:00"
        }
      ]
    }

Listing Export Sets

Using the OCI CLI

  1. Get the compartment where you want to list export sets (oci iam compartment list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs export-set list 
    --availability-domain AD-1 \
    --compartment-id compartment_OCID

    Example:

    oci fs export-set list --availability-domain AD-1 \
    --compartment-id ocid1.compartment.uniqueID
    
    {
      "data": [
        {
          "availability-domain": "AD-1",
          "compartment-id": "ocid1.compartment.uniqueID",
          "display-name": "MyMountTarget2 - export set",
          "id": "ocid1.exportset.uniqueID",
          "lifecycle-state": "ACTIVE",
          "time-created": "2021-06-17T19:01:37+00:00",
          "vcn-id": "ocid1.vcn.uniqueID"
        }
      ]
    }

Deleting an Export

Deleting an export deletes the file system path that clients use to mount the file system. Deleting an export does not delete any file systems.

Caution:

When you delete an export, you can no longer mount the file system using the file path specified in the deleted export. Any clients that use the export path to mount a file system will not be able to access the file system.

Using the Compute Web UI

  1. In the navigation menu, under File Storage, click File Systems.

  2. Select the appropriate compartment.

  3. Click the name of a file system that uses the export you plan to delete.

  4. Click the Action menu (three dots) for the export and select Delete.

  5. Confirm the deletion.

Using the OCI CLI

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

    • export OCID (oci fs file-system list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs export delete
    --export-id <export_OCID>

    Example:

    oci fs export delete --export-id ocid1.export.….….….uniqueID
    Are you sure you want to delete this resource? [y/N]: y

Moving a Mount Target to a Different Compartment

Using the OCI CLI

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

    • Mount target OCID (oci fs mount-target list)

    • Destination Compartment OCID (oci iam compartment list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs mount-target change-compartment 
    --mount-target-id <mount_target_OCID>
    --compartment-id <destination_compartment_OCID>

    Example:

    oci fs mount-target change-compartment  \
    --mount-target-id ocid1.….….….uniqueID  \
    --compartment-id ocid1.compartment.….….….uniqueID
    {
      "etag": "864d51bd-ed69-44bc-8c54-2a65d55fe07b"
    }

Deleting a Mount Target

Caution:

Deleting a mount target deletes all the exports that are associated with the mount target.

Using the Compute Web UI

  1. In the navigation menu, under File Storage, click Mount Targets.

  2. Select the compartment where the mount target resides.

  3. Click the Action menu (three dots) for the mount target you plan to delete.

  4. Select Delete.

  5. Confirm the deletion.

Using the OCI CLI

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

    • Mount target OCID (oci fs mount-target list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs mount-target delete 
    --mount-target-id <mount_target_OCID>

    Example:

    oci fs mount-target delete  \
    --mount-target-id ocid1.mounttarget.….….….uniqueID
    Are you sure you want to delete this resource? [y/N]: y