Creating a volume - FSx for OpenZFS
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Creating a volume

You can create an FSx for OpenZFS volume using the Amazon FSx console, the Amazon CLI, and the Amazon FSx API. You can create new volumes, or create a volume from an existing volume snapshot.

  1. Open the Amazon FSx console at https://console.amazonaws.cn/fsx/.

  2. In the left navigation pane, choose File systems, and then choose the FSx for OpenZFS file system that you want to create a volume for.

  3. Choose the Volumes tab.

  4. Choose Create volume.

    The Create volume dialog box appears.

  5. In the File system field, choose the file system to create the volume on.

  6. In the Parent volume ID field, choose the ID of the parent volume, which can be the root volume or another volume.

  7. In the Volume name field, provide a name for the volume. You can use a maximum of 203 alphanumeric characters, plus the underscore (_) special character. The name must be unique among all the volume names on the same parent volume on the same file system.

  8. For Storage capacity quota - optional, you can set a quota that will be the maximum storage size for the volume. This quota cannot be larger than the parent volume quota. To set no quota and allow this volume to consume any available capacity in your file system, set this property to -1.

  9. For Storage capacity reservation - optional, you can enter the reservation for the volume. This reserves dedicated space on the file system storage pool, meaning the space available to all other volumes is reduced by the amount specified. It cannot be set to a value that's greater than the parent volume quota or the remaining reservation space on the file system storage. To set no reservation and allow this volume to consume any available capacity in your file system, set this property to 0 or -1.

  10. For Data compression type, choose the type of compression to use for your volume, either Zstandard, LZ4, or No compression. Zstandard compression provides more data compression and higher read throughput than LZ4 compression. LZ4 compression provides less compression and higher write throughput performance than Zstandard compression. For more information about the storage and performance benefits of the volume data compression options, see Data compression.

  11. For Copy tags to snapshots, enable or disable the option to copy tags on the root volume to snapshots.

  12. For NFS exports, there is a default client configuration setting which you can modify or remove. Client configurations define which clients can access the volume and their permissions.

    To provide additional client configurations:

    1. In the Client addresses field, specify which clients can access the volume. Enter an asterisk (*) for any client, a specific IP address, or a CIDR range of IP addresses.

    2. In the NFS options field, enter a comma-delimited set of exports options. For example, enter rw to allow read and write permissions to the volume.

    3. Choose Add client configuration.

    4. Repeat the procedure to add another client configuration.

    For more information, see NFS exports.

  13. For Record size, choose whether to use the default suggested record size of 128 KiB, or to set a User-configured suggested record size for the volume. Generally, workloads that write in fixed small or large record sizes may benefit from setting a custom record size, like database workloads (small record size) or media streaming workloads (large record size). We recommend using the default setting for the majority of use cases. For more information about the record size setting, see Volume properties.

  14. For User and group quotas, you can set a storage quota for a user or group:

    1. For Quota type, choose USER or GROUP.

    2. For User or group ID, choose a number that is the ID of the user or group.

    3. For Usage quota, choose a number that is the storage quota of the user or group.

    4. Choose Add quota.

    5. Repeat the procedure to add a quota for another user or group.

  15. To create a volume from an existing volume snapshot, use Source snapshot ID - optional, to specify the ID of a snapshot from which to create a volume. Then choose a Source snapshot copy strategy option for the type of volume you're creating:

    • Clone creates a clone volume. The snapshot will provide the seed content for the volume.

    • Full copy creates a volume that will contain data copied from the snapshot.

  16. Choose Confirm to create the volume.

You can monitor the progress on the File systems detail page, in the Status column of the Volumes pane. The volume is ready for use when its status is Created.

  • To create an FSx for OpenZFS volume, use the create-volume CLI command (or the equivalent CreateVolume API operation). The following example creates a new volume by cloning an existing snapshot.

    aws fsx create-volume \ --name vol2 \ --volume-type OPENZFS \ --tags Key=creator,Value=Liu \ --open-zfs-configuration '{ "CopyTagsToSnapshots": true, "DataCompressionType": "LZ4", "NfsExports": [ { "ClientConfigurations": [ { "Clients": "*", "Options": [ "rw","root_squash","crossmnt" ] } ] } ], "OriginSnapshot": { "CopyStrategy": "CLONE", "SnapshotARN": "arn:aws:fsx:us-east-2:111122223333:snapshot/fsvol-0123456789abcdef0/fsvolsnap-1234567890abcdef0" }, "ParentVolumeId": "fsvol-abcdef01234567890", "ReadOnly": false, "RecordSizeKiB": 128, "StorageCapacityQuotaGiB": 10000, "StorageCapacityReservationGiB": -1, "UserAndGroupQuotas": [ { "Id": 1004, "StorageCapacityQuotaGiB": 2000, "Type": "GROUP" } ] }'

After successfully creating the volume, Amazon FSx returns its description in JSON format.