Managing File Systems

A file system in the File Storage service represents a network file system that is mounted by one or more clients. File systems are associated with a single compartment. File systems must have at least one export in one mount target for any client to mount and use the file system. Data is added to a file system from the client.

This section describes how to manage file systems after they are created. For instructions to create a file system, see Creating a File System, Mount Target, and Export.

Listing and Viewing the Details of a File System

Using the Compute Web UI

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

  2. Select the appropriate compartment.

    The file systems for the compartment are listed.

  3. To see file system details, click the name of the file system.

Using the OCI CLI

  • Listing File Systems

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

    2. Run this command.

      Syntax (entered on a single line):

      oci fs file-system list --availability-domain AD-1 \
      --compartment-id compartment_OCID

      Example:

      oci fs file-system list --availability-domain AD-1 \
      --compartment-id ocid1.compartment.uniqueID
      {
        "data": [
          {
            "availability-domain": "AD-1",
            "compartment-id": "ocid1.compartment.uniqueID",
            "defined-tags": {},
            "display-name": "MyFileSystem",
            "freeform-tags": {},
            "id": "ocid1.filesystem.uniqueID",
            "kms-key-id": null,
            "lifecycle-state": "ACTIVE",
            "metered-bytes": 180224,
            "time-created": "2021-06-16T19:48:18+00:00"
          },
          {
            "availability-domain": "AD-1",
            "compartment-id": "ocid1.compartment.uniqueID",
            "defined-tags": {},
            "display-name": "pluto",
            "freeform-tags": {},
            "id": "ocid1.filesystem.uniqueID",
            "kms-key-id": null,
            "lifecycle-state": "ACTIVE",
            "metered-bytes": 147456,
            "time-created": "2021-06-17T23:16:43+00:00"
          }
        ]
      }
  • Getting the File System Details

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

      • File System OCID (oci fs file-system list)

    2. Run this command.

      Note:

      This procedure shows the minimum required parameters for this command. For information about optional parameters, run the command with the --help option.

      Syntax (entered on a single line):

      oci fs file-system get --file-system-id file_system_OCID

      Example:

      oci fs file-system get  \
      --file-system-id ocid1.filesystem.uniqueID
      {
        "data": {
          "availability-domain": "AD-1",
          "compartment-id": "ocid1.compartment.uniqueID",
          "defined-tags": {},
          "display-name": "MyFileSystem",
          "freeform-tags": {},
          "id": "ocid1.filesystem.uniqueID",
          "kms-key-id": null,
          "lifecycle-state": "ACTIVE",
          "metered-bytes": 180224,
          "time-created": "2021-06-16T19:48:18+00:00"
        },
        "etag": "58dec47e-4732-4730-9e18-6b5db1ac30d6"
      }

Updating a File System

Using the Compute Web UI, you can change only the file system name. Using the OCI CLI, you can change the file system name and quota.

Using the Compute Web UI

  1. On the Dashboard, click the File Storage/View File Systems button.

  2. If the file system that you want to update is not listed, use the Compartment drop-down menu above the instances list to select the correct compartment.

  3. For the file system that you want to update, click the Actions menu, and click the Edit option.

  4. Enter a new name in the name field.

  5. Click Save Changes.

Using the OCI CLI

  1. Get the OCID of the file system that you want to update:oci fs file-system list

  2. To set the quota for the file system see Creating a File System.

    To reduce the quota for the file system, first check the current file system usage. The quota cannot be set smaller than the current usage. Current usage includes the data in the file system and all snapshots created under the file system. To check the current usage, check the value of metered-bytes in the file system get output or Metered Bytes on the file system details page in the Compute Web UI.

    Note:

    The metered bytes value can take up to 15 minutes to refresh on a system with active I/O.

    Fifteen minutes after setting a lower quota, compare the quota and metered bytes values for the file system. Check the value of quota in defined-tags in the file system get output, or check on the Tags tab on the file system details page in theCompute Web UI. If the quota is less than metered bytes, then the quota will not be enforced and you should set a higher quota.

  3. Run the update file system command.

    Example:

    $ oci fs file-system update 
    --file-system-id ocid1.filesystem.unique_ID \
    --defined-tags '{"OraclePCA":{"quota":500000}}'

Moving a File System to a Different Compartment

Using the OCI CLI

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

    • File System OCID (oci fs file-system list)

    • Destination compartment OCID (oci iam compartment list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs file-system change-compartment 
    --file-system-id <file-system_OCID> 
    --compartment-id <destination_compartment_OCID>

    Example:

    oci fs file-system change-compartment  \
    --file-system-id ocid1.filesystem.….….….uniqueID  \
    --compartment-id ocid1.compartment.….….….destination-uniqueID
    {
      "etag": "0acc73ca-839d-451e-b079-4013889c233a"
    }

Deleting a File System

A file system that has an export cannot be deleted. To delete the export, see Deleting an Export.

You cannot delete file systems that have dependencies. For example, if you have created a snapshot of this file system and then created a new file system from the snapshot, you cannot delete the source file system. For details, see File Storage Overview in the Oracle Private Cloud Appliance Concepts Guide.

Using the Compute Web UI

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

  2. Select the appropriate compartment.

  3. Click the Action menu (three dots) for the file system and select Delete.

  4. Confirm the deletion.

Using the OCI CLI

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

    • File System OCID (oci fs file-system list)

  2. Run this command.

    Syntax (entered on a single line):

    oci fs file-system delete
    --file-system-id <file-system_OCID>

    Example:

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