Creating a File System
On Compute Cloud@Customer, you can create a shared file system using the File Storage service.
To set a value for the file system quota, database record size, or the pool to use for the backing store, use theOCI CLI.
Avoid entering confidential information in names and tags.
-
On the Compute Cloud@Customer Console Dashboard, click File Storage/View File Systems.
-
Click Create File System.
-
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 defined or free-form tags for this instance as described in Tagging Resources on Compute Cloud@Customer. Tags can also be applied later.
-
-
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
-
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
-
-
Decide whether you need to set certain optional properties.
The following properties are set using defined tags. For the syntax to specify a defined tag, see Adding Tags at Resource Creation.
Specify the
OraclePCA
tag namespace to set values for the following properties:-
File system quota: Specify
quota
for the tag key. The default value ofquota
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 reset with the file systemupdate
command. -
Database record size: Specify
databaseRecordSize
for the tag key. The default database record size is 131072 bytes. You can specify one of the following values (in bytes) for the value ofdatabaseRecordSize
: 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576. ThedatabaseRecordSize
property can be set only when the file system is created. You can't change this property value with theupdate
command. -
Backing store pool: Specify
poolName
for the tag key. By default, the backing store of a file system instance is the default pool of the attached storage, specified asPCA_POOL
. You can specifyPCA_POOL_HIGH
for the value ofpoolName
to indicate that you want to use a high performance pool for the backing store. ThepoolName
property can be set only when the file system is created. You can't change this property value with theupdate
command.
See the following step for an example of setting these values.
-
-
Run the create file system command.
Syntax:
oci fs file-system create --availability-domain availability_domain_name --compartment-id <compartment_OCID>
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": {}, "display-name": "MyFileSystem", "freeform-tags": {}, "id": "ocid1.filesystem.unique_ID", "is-clone-parent": false, "is-hydrated": true, "kms-key-id": null, "lifecycle-details": "", "lifecycle-state": "CREATING", "metered-bytes": 0, "source-details": { "parent-file-system-id": "", "source-snapshot-id": "" }, "time-created": null }, "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
-
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.