操作系统可以透明地使用ebs吗?

时间:2016-09-19 02:22:42

标签: mongodb amazon-web-services operating-system

我知道我们可以动态地将卷连接和分离到一个实例。我的问题是操作系统会自动分配这些plysicall资源,还是应该由用户配置,即为文件系统创建一个挂载点并明确告诉应用程序挂载点是什么?

我使用this云形成将mongodb部署到aws,模板为用户提供了指定托管数据库服务器的卷大小的选项,只是想知道即使我分配了物理资源,模板如何使用它?我如何知道数据所在的卷。当我尝试为实例分离其中一个卷时,事情就会中断。但我确信我不需要这么多卷来托管数据

1 个答案:

答案 0 :(得分:1)

是的,您需要在创建ebs并将其附加到某个实例后手动执行此操作,您需要执行以下步骤(在Linux系统上)

- Check if volume is attached and get its name.
   lsblk
- Format the newly attached volume
   mkfs -t ext4 /dev/<volume name>
- Create a mount_point
   mkdir mount_point
- mount the volume to mount point
   mount /dev/<volume_name> mount_point
- Verify the newly attached partition
   df -Ht

无法看到您的云形成模板