Creating a File System

On Compute Cloud@Customer, you can create a shared file system using the File Storage service.

(Optional) To create a file system with specific values for these attributes, first configure the attributes as described in Creating OraclePCA Tags. Then use the following information when you create the block volume.

  • Quota

    The default value of quota is 0, which means no quota is set. A quota that you set includes the data in the file system and all snapshots created under the file system. You can specify a quota value in gigabytes from 0 to 8000000 (8 petabytes). Any fractional portion of the gigabyte value is rounded to the next larger megabyte. The file system quota can be changed with the file system update command.

    To apply a quota, during file system creation, assign this defined tag:

    • Tag namespace: OraclePCA
    • Tag name: quota
    • Value: <quota value in gigabytes>
  • Database record size

    The default database record size is 131072 bytes. You can specify one of the following values (in bytes): 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576. The record size can be set only when the file system is created. You can't set or change this property value later.

  • To use a nondefault value, during file system creation, assign this defined tag:

    • Tag namespace: OraclePCA
    • Tag name: databaseRecordSize
    • Value (select one): 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576
  • Backing store pool

    By default, the backing store of a file system is the default pool of the attached ZFS Storage Appliance, specified as PCA_POOL. You can specify PCA_POOL_HIGH to indicate that you want to use a high performance pool for the backing store. Before you specify PCA_POOL_HIGH, verify that a high performance pool is available. This property can be set only when the file system is created. You can't set or change this property value later.

    To use a nondefault value, during file system creation, assign this defined tag:

    • Tag namespace: OraclePCA
    • Tag name: databaseRecordSize
    • Value (select one): PCA_POOL (default) or PCA_POOL_HIGH

Avoid entering confidential information in names and tags.

    1. In the Compute Cloud@Customer Console navigation menu, click File Storage, then click File Systems.
    2. Ensure that the correct compartment is selected in the compartment drop-down menu above the file systems list. The file system and mount target must be in the same compartment and the same backing store pool when you create an export.

    3. Click Create File System.

    4. In the Create File System dialog box, enter the following information:

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

      • Create in Compartment: Select the compartment where the file system is created.

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

        To use nondefault values for the quota, database record size, or backend store pool, specify the appropriate tags to set the values for these attributes. See Adding Tags at Resource Creation.

    5. Click Create File System.

      The file system is created.

      Next, create an export for the file system. See Creating an Export for a File System.

  • Use the oci fs file-system create command and required parameters to create a new file system in the specified compartment and availability domain.

    oci fs file-system create --availability-domain <availability_domain_name>  --compartment-id <compartment_id> --display-name <fs_display_name>  [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:

      • Availability Domain Name (oci iam availability-domain list)

      • Compartment OCID (oci iam compartment list)

      • File System Name: The display name you want assigned to this file system

    2. To use nondefault values for the quota, database record size, or backend store pool, specify the appropriate tags to set the values for these attributes. See Adding Tags at Resource Creation.

      See the following step for an example of setting these values.

    3. Run the create file system command.

      Example:

      oci fs file-system create --availability-domain AD-1 --compartment-id ocid1.compartment.unique_ID --display-name MyFileSystem
      
      {
        "data": {
          "availability-domain": "AD-1",
          "compartment-id": "ocid1.compartment.unique_ID",
          "defined-tags": {
            "Oracle-Tags": {
              "CreatedBy": "pca_user",
              "CreatedOn": "2024-07-05T13:15:11.19Z"
            }
          },
          "display-name": "MyFileSystem",
          "freeform-tags": {},
          "id": "ocid1.filesystem.unique_ID",
          "is-clone-parent": false,
          "is-hydrated": true,
          "is-targetable": null,
          "kms-key-id": "",
          "lifecycle-details": "",
          "lifecycle-state": "CREATING",
          "metered-bytes": 0,
          "source-details": {
            "parent-file-system-id": "",
            "source-snapshot-id": ""
          },
          "time-created": "2024-07-05T13:15:11.234434+00:00"
        },
        "etag": "58dec47e-4732-4730-9e18-6b5db1ac30d6"
      }

      Example using defined tags to set additional properties:

      To set a quota for the file system, change the default database record size, or specify a high performance pool for the file system backing store, use OraclePCA defined tags as shown in the following example.

      oci fs file-system create --availability-domain AD-1 --compartment-id ocid1.compartment.unique_ID  --display-name myfilesystem --defined-tags '{"OraclePCA":{"quota":100000,"databaseRecordSize":8192,"poolName":"PCA_POOL_HIGH"}}'

      Alternatively, you can specify these properties in a JSON file.

      {
        "OraclePCA": {
          "quota": 100000,
          "databaseRecordSize": 8192,
          "poolName": "PCA_POOL_HIGH"
        }
      }

      Then specify the file as the argument of the --defined-tags option.

      --defined-tags file://./fs_options.json
    4. Next, create an export for the file system. See Creating an Export for a File System.

  • Use the CreateFileSystem operation to create a new file system in the specified compartment and availability domain.

    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.