If you are getting started with FSx for OpenZFS for the first time, follow these steps to learn how to create your file system, mount it from an Amazon EC2 instance, and clean up your resources once you are done.
Topics
Prerequisites
Before you use Amazon FSx for the first time, make sure that you have completed the following tasks:
Sign up for an AWS account
If you do not have an AWS account, complete the following steps to create one.
To sign up for an AWS account
Open https://portal.aws.amazon.com/billing/signup
. Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.
When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access.
AWS sends you a confirmation email after the sign-up process is
complete. At any time, you can view your current account activity and manage your account by
going to https://aws.amazon.com/
Create a user with administrative access
After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks.
Secure your AWS account root user
-
Sign in to the AWS Management Console
as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password. For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide.
-
Turn on multi-factor authentication (MFA) for your root user.
For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide.
Create a user with administrative access
-
Enable IAM Identity Center.
For instructions, see Enabling AWS IAM Identity Center in the AWS IAM Identity Center User Guide.
-
In IAM Identity Center, grant administrative access to a user.
For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in the AWS IAM Identity Center User Guide.
Sign in as the user with administrative access
-
To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.
For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the AWS Sign-In User Guide.
Assign access to additional users
-
In IAM Identity Center, create a permission set that follows the best practice of applying least-privilege permissions.
For instructions, see Create a permission set in the AWS IAM Identity Center User Guide.
-
Assign users to a group, and then assign single sign-on access to the group.
For instructions, see Add groups in the AWS IAM Identity Center User Guide.
Step 1: Create a file system
The following procedures detail how to create a file system using the Quick create and Standard create options on the Amazon FSx console. For instructions on how to create a file system using the AWS CLI instead of the AWS Management Console, see Creating an Amazon FSx for OpenZFS file system.
Use the Quick create option to rapidly and easily create a file system with the default root volume
configuration. This configuration automatically creates one root volume named fsx
with a path of /fsx
, a record size of 128 KiB, and an NFS exports
setting in which
Client addresses is an asterisk (*
) and
NFS options is rw,crossmnt
. With these settings, any clients
permitted by your VPC and security group settings can access the volume with read and write
permissions. The file system data is encrypted at rest using your default service manages AWS KMS key, named aws/fsx/(default)
.
Use the Standard create option to create a file system with a customized root volume configuration. For a list of the file system properties that you can customize, see Configurable file system properties. We recommend using Standard create only when you are familiar with FSx for OpenZFS file systems and volumes.
To create a file system using Quick create
Open the Amazon FSx console at https://console.aws.amazon.com/fsx/
. -
On the dashboard, choose Create file system to start the file system creation wizard.
-
On the Select file system type page, choose Amazon FSx for OpenZFS, and then choose Next. The Create OpenZFS file system page appears. For Creation method, choose Quick create. To create a file system using the Standard create method, see Creating an Amazon FSx for OpenZFS file system.
-
In the Quick configuration section, for File system name - optional, enter a name for your file system. It's easier to find and manage your file systems when you name them. You can use a maximum of 256 Unicode letters, white space, and numbers, plus these special characters: + - (hyphen) = . _ (underscore) : /.
-
For Storage class, select Intelligent-Tiering (elastic) or SSD (provisioned).
Intelligent-Tiering (elastic) offers fully elastic storage that is suitable for most workloads, as well as an optional SSD read cache that provides SSD latencies for reads of frequently accessed data. With Intelligent-Tiering, you are billed for the data you store, depending on the size of your dataset, and do not need to specify a file system size. Intelligent-Tiering is only supported for Multi-AZ (HA) file systems.
SSD (provisioned) provides low-latency access to your data. With SSD storage, you are billed for the amount of storage that you provision.
-
For Deployment type, select Multi-AZ (HA) or Single-AZ (HA).
Multi-AZ (HA) file systems offer high availability and high durability by replicating your data and supporting failover across multiple Availability Zones in the same AWS Region, with a separate copy of your data in each availability zone. Failover typically completes within 60 seconds.
Single-AZ (HA) file systems offer high availability by deploying a primary and standby file system within the same Availability Zone to deliver continuous availability in the event of failover and failback. Failover typically completes within 60 seconds. Single-AZ (HA) is only available for file systems using the SSD (provisioned) storage class.
We recommend using Multi-AZ (HA) for most production workloads. We recommend using Single-AZ (HA) for workloads that require consistent single-AZ latencies and as a cost-effective solution for workloads that do not require the high levels of durability that Multi-AZ (HA) provides. For more information on how to choose between deployment types, see Availability by AWS Region and File system performance.
-
For Throughput capacity (Intelligent-Tiering only), select the desired throughput capacity of your file system, in MBps. For file systems using the Intelligent-Tiering storage class, the minimum storage capacity is 1280 MBps. To specify throughput capacity for a file system using the SSD (provisioned) storage class, please create a file system using Standard Create.
-
For SSD read cache sizing mode (Intelligent-Tiering only), select either Automatic, Custom, or None. Automatic is selected by default. With this option, Amazon FSx automatically chooses a read cache size based on your provisioned throughput. If you know the approximate size of your active working dataset, you can select Custom to customize the size of the SSD read cache. If your workload is not latency-sensitive, you can also choose None to create an elastic file system without an SSD cache and reduce costs.
-
For SSD storage capacity (SSD (provisioned) only), specify the storage capacity of your file system, in gibibytes (GiBs). Enter any whole number in the range of 64–524,288.
-
For Virtual Private Cloud (VPC), choose the Amazon VPC that you want to associate with your file system.
-
For Subnet, choose the subnet in which your file system's elastic network interface resides.
-
Choose Next.
-
Review the file system configuration shown on the Create OpenZFS file system page. For your reference, note which file system settings you can modify after the file system is created.
-
Choose Create file system.
After your file system is created, you can create additional volumes as needed to organize your data. Any new volumes that you create will be children of the root volume. For more information on how to create additional volumes, see Creating an Amazon FSx for OpenZFS volume.
Step 2: Mount your file system from an Amazon EC2 instance
Once you have created your file system, you can access the data stored within it by mounting individual volumes on your client from an Amazon Elastic Compute Cloud (Amazon EC2) instance. FSx for OpenZFS supports a wide variety of compute instances and operating systems using the Network File System (NFS) protocol (v3, v4.0, v4.1, and v4.2), including Amazon EC2 instances running Linux, macOS, and Microsoft Windows.
The following instructions detail how to mount a volume from an Amazon EC2 instance on a Linux, macOS, or Windows client. Note that you can also view and copy the exact commands needed to mount any FSx for OpenZFS volume by choosing Attach on the details page for that volume in the Amazon FSx console.
Note
The commands to mount a volume require the DNS name of the file system in which the volume is created. To identify a file system's DNS name in the Amazon FSx console, choose File systems, then choose the FSx for OpenZFS file system whose volume you are mounting. The DNS name will be displayed in the Network & security panel. This information can also be found in the response of the DescribeVolumes API operation.
To mount a volume from an Amazon EC2 instance on Linux
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. Create or select an Amazon EC2 instance running Amazon Linux 2 that is in the same virtual private cloud (VPC) as your file system. For more information about launching an instance, see Step 1: Launch an instance in the Amazon EC2 User Guide.
Connect to your Amazon EC2 Linux instance. For more information, see Connect to your Linux instance in the Amazon EC2 User Guide.
Open a terminal on your Amazon EC2 instance using secure shell (SSH), and log in with the appropriate credentials.
If you are using CentOS, RedHat, or Ubuntu, install the NFS client. This step is not necessary if you are using the latest version of the Amazon Linux 2.
For CentOS and RedHat use the following command: sudo yum –y install nfs-utils
For Ubuntu use this command: sudo apt-get -y install nfs-common
-
Create a directory on your Amazon EC2 instance for the volume's local mount path with the following command. In the following example, replace
fsx
with your desired location.sudo mkdir /
fsx
Use the following
mount
command to mount your Amazon FSx for OpenZFS file system to the directory that you created. Replace the following:Replace
nfs-version
with an NFS protocol version, such as4.2
.Replace
fs-dns-name
with the DNS name or the IP address of the file system.Replace
volume-path
with the path of the volume to mount. For example, use/fsx
to mount the root volume or a path such as/fsx/sales
to mount the top-levelfsx/sales
directory.Replace
local-mount-path
with the directory path of your local mount path, such as/fsx
for the directory you created in step 5.
sudo mount -t nfs -o nfsvers=
nfs-version
fs-dns-name
:volume-path
local-mount-path
The following example uses sample values.
sudo mount -t nfs -o nfsvers=4.2 fs01234567.fsx.us-east-1.amazonaws.com:/fsx /fsx
You can also use the IP address of the file system instead of its DNS name.
sudo mount -t nfs -o nfsvers=4.2 198.51.100.5:/fsx /fsx
If you have issues with your Amazon EC2 instance (such as connections timing out), see Troubleshoot EC2 instances in the Amazon EC2 User Guide.
Step 3: Clean up your resources
Follow these steps to clean up your resources, delete your file system as needed, and protect your AWS account.
To clean up your resources and delete your file system
-
On the Amazon EC2 console, terminate your instance. For more information, see Terminate Your Instance in the Amazon EC2 User Guide.
-
Open the Amazon FSx console at https://console.aws.amazon.com/fsx/
. -
On the Amazon FSx console, delete your file system. When you delete a file system, all volumes and automatic backups are deleted automatically. However, you still must delete any manually created backups. The following steps outline this process.
-
From the console dashboard, choose the name of the file system that you created for this exercise.
-
For Actions, choose Delete file system.
-
In the Delete file system dialog box that opens, decide whether you want to create a final backup. If you do, provide a name for the final backup. Any automatically created backups are also deleted.
Important
New file systems can be created from backups. We recommend that you create a final backup as a best practice. If you find you don't need it after a certain period of time, you can delete this and other manually created backups.
-
Enter the ID of the file system that you want to delete in the File system ID box.
-
Choose Delete file system.
-
The file system is now being deleted, and its status in the dashboard changes to DELETING. When the file system has been deleted, it no longer appears in the dashboard. Any automatic backups are deleted along with the file system.
-
Now you can delete any manually created backups for your file system. From the left-side navigation, choose Backups.
-
From the dashboard, choose any backups that have the same File system ID as the file system that you deleted, and choose Delete backup. Be sure to retain the final backup, if you created one.
-
The Delete backups dialog box opens. Keep the check box selected for the IDs of the backups that you want to delete, and then choose Delete backups.
Your Amazon FSx file system and any related automatic backups are now deleted, along with any manual backups that you chose to delete as well.
-