I have created an FSX for Lustre service in AWS, with a Data Repository Association to an S3 bucket. I am looking to create an EC2 instance that has the FSX file share mounted and contains the files that are in the S3 bucket as locally mounted files.
I am creating the EC2 instance from a launch template (shown below), and I do see the FSX folder present, however, I do not see any files within the folder.
My FSX AWS resource is:
My launch template user-data is:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="==MYBOUNDARY=="
--==MYBOUNDARY==
Content-Type: text/cloud-config; charset="us-ascii"
runcmd:
- region=us-west-2
- amazon-linux-extras install -y lustre2.10
- mkdir -p /data/fsx
- mount -t lustre fs-xxxxxx.fsx.us-west-2.amazonaws.com@tcp:fsx" /data/fsx
--==MYBOUNDARY==--
When I ssh into the EC2 instance created with the launch template I see an empty folder under where my FSX file share should be mounted:
$ ls -lah /data/fsx/
total 0
drwxr-xr-x 2 root root 6 Jan 13 21:40 .
drwxr-xr-x 3 root root 17 Jan 13 21:40 ..
Does anyone have any pointers as to why my /data/fsx
folder is empty, and how I can get it populated with the data in my FSX data repository path S3 bucket?
From what you've described it might be multiple issues related to AWS configuration and OS and/or lustre configuration. I would follow the next troubleshooting steps:
When you sshed to the instance, check if you can list or get files from the bucket. For that, you can use
aws s3
commands. Like this:aws s3 ls s3://<bucket-name>/
aws s3 cp s3://<bucket-name>/<some-file> ./
If you have permission denied, check if you have needed permissions assigned to an EC2 instance's IAM profile. See for more info https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#attach-iam-role
If s3 permissions are settled up correctly, then check luster logs and folder permissions.