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

问题描述

我有一个EBS卷(如的/ dev / SDF )已经被连接到一个EC2实例(从不同的EBS卷靴),我已经装卷(通过设置/ dev / SDF /数据)。当我停止并重新启动实例,成交量仍然附着但不再装了,我必须手动重新安装它。

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 自动安装到 /数据在启动实例?

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卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 06:00