3

I am deploying an Amazon Linux AMI to EC2, and have the following directive in my user_data:

packages:
  - amazon-efs-utils

mounts:
  - [ "fs-12345678:/", "/mnt/efs", "efs", "tls", "0", "0" ]

I am expecting this to add the appropriate line to my /etc/fstab and mount the Amazon EFS filesystem. However, this does not work. Instead I see the following in my /var/log/cloud-init.log log file:

May 10 15:16:51 cloud-init[2524]: cc_mounts.py[DEBUG]: Attempting to determine the real name of fs-12345678:/
May 10 15:16:51 cloud-init[2524]: cc_mounts.py[DEBUG]: Ignoring nonexistent named mount fs-12345678:/
May 10 15:16:51 cloud-init[2524]: cc_mounts.py[DEBUG]: changed fs-12345678:/ => None

If I manually add the expected entry to my /etc/fstab, I can indeed mount the filesystem as expected.

I've found a couple of bugs online that talk about similar things, but they're all either not quite the same problem, or they claim to be patched and fixed.

I need this filesystem to be mounted by the time I start executing scripts via the cloud_final_modules stage, so it would be highly desirable to have the mount: directive work rather than having to do nasty hacky things in my later startup scripts.

Can anybody suggest what I am doing wrong, or if this is just not supported?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

1 Answers1

2

It is clear that the cloud-init mount module does not support the efs "device" name.