在启动 Amazon EC2 Linux 实例时自动挂载 EBS 卷 [英] Automatically mount an EBS volume upon starting an Amazon EC2 Linux instance

查看:27
本文介绍了在启动 Amazon EC2 Linux 实例时自动挂载 EBS 卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 EBS 卷(例如 /dev/sdf)已附加到 EC2 实例(从不同的 EBS 卷启动),并且我已挂载该卷(通过 /dev/sdf>mount/dev/sdf/data).当我停止并重新启动实例时,卷仍然附加但不再安装,我必须再次手动安装它.

I have an EBS volume (e.g. /dev/sdf) that has been attached to an EC2 instance (which boots from a different EBS volume), and I have mounted the volume (through mount /dev/sdf /data). When I stop and start again the instance, the volume is still attached but no longer mounted, and I have to manually mount it again.

有没有办法让卷/dev/sdf在启动实例时自动挂载到/data?

Is there a way to make the volume /dev/sdf automatically mounted to /data upon starting the instance?

推荐答案

进入/etc/fstab

条目如下:

/dev/sdf    /data   ext3    defaults    1 1

这将在重启期间自动挂载卷.

This will automatically mount the volume during reboot.

这篇关于在启动 Amazon EC2 Linux 实例时自动挂载 EBS 卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆