【以下的问题经过翻译处理】 期望的结果:我希望临时驱动器在启动时挂载。最好在用户数据执行开始之前。
实例类型:g4dn.xlarge
AMI:使用ImageBuilder创建的自定义AMI,基于ami-09f85944838b438c5,该AMI基于Amazon Linux 2。
EC2文档表示:“实例类型支持的所有NVMe实例存储卷都会在实例启动时自动枚举并分配设备名称;将它们包含在AMI或实例的块设备映射中对它们没有影响。"
cloud-init.log日志显示如下
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: mounts configuration is [['ephemeral0', '/media/ephemeral0'], ['swap', 'none', 'swap', 'sw', '0', '0']]
Dec 17 15:35:02 cloud-init[4081]: util.py[DEBUG]: Reading from /etc/fstab (quiet=False)
Dec 17 15:35:02 cloud-init[4081]: util.py[DEBUG]: Read 91 bytes from /etc/fstab
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0
Dec 17 15:35:02 cloud-init[4081]: DataSourceEc2.py[DEBUG]: Unable to convert ephemeral0 to a device
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: changed ephemeral0 => None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Ignoring nonexistent named mount ephemeral0
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Attempting to determine the real name of swap
Dec 17 15:35:02 cloud-init[4081]: DataSourceEc2.py[DEBUG]: Unable to convert swap to a device
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: changed swap => None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Ignoring nonexistent named mount swap
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0
Dec 17 15:35:02 cloud-init[4081]: DataSourceEc2.py[DEBUG]: Unable to convert ephemeral0 to a device
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: changed default device ephemeral0 => None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount ephemeral0
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Attempting to determine the real name of swap
Dec 17 15:35:02 cloud-init[4081]: DataSourceEc2.py[DEBUG]: Unable to convert swap to a device
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: changed default device swap => None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount swap
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Skipping nonexistent device named None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: Skipping nonexistent device named None
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: no need to setup swap
Dec 17 15:35:02 cloud-init[4081]: cc_mounts.py[DEBUG]: No modifications to fstab needed
Dec 17 15:35:02 cloud-init[4081]: handlers.py[DEBUG]: finish: modules-config/config-mounts: SUCCESS: config-mounts ran successfully