我可以创建包含多个 ebs 卷(即 sda 和 sdb)的 AMI

发布于 2024-11-28 07:21:40 字数 336 浏览 2 评论 0原文

我有一个在 EC2 上运行的 ebs 支持的实例。我使用它对存储在 sdb 上的大约 16Gb 数据(即与实例关联的较大 ebs 卷)进行一些计算密集型文本处理。

我想通过创建该实例的副本来并行处理,每个副本都有自己的数据副本。我可以从实例创建 AMI,但我需要映像包含 sda(根 ebs 卷)和 sdb(所有数据所在的卷)。如何制作整个包裹的复制品?

在AWS管理控制台中创建映像只是复制sda(即根卷,它太小而无法容纳我的数据)。

这可能吗?

(PS:我什至没有在AWS管理控制台Elastic Block Store->Volumes面板中看到sdb卷)

谢谢!

I have an ebs-backed instance running on EC2. I'm using it to do some computationally intensive text processing on around 16Gb of data which is stored on sdb (i.e. the larger ebs volume associated with the instance).

I'd like to parallelized the processing by creating replicas of this instance, each with its own copy of the data. I can create an AMI from the instance but I need the image to include BOTH sda (the root ebs volume) AND ALSO sdb, which is the volume where all the data is. How can I make a replica of the whole package?

Creating an image in the AWS Management Console just copies sda (i.e. the root volume, which is too small to hold my data).

Is this even possible?

(PS: I don't even see the sdb volume in the AWS Management Console Elastic Block Store->Volumes panel)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

百变从容 2024-12-05 07:21:40

我曾经需要这种设置,我必须在 EBS 支持的机器上设置 MySQL,并将数据存储在单独的 EBS 卷中。 AMI 必须是这样的,每次实例化它时,它都应该附加数据卷(其中包含静态数据)。我就是这样做的:

  1. 从任何现有映像创建 EBS 支持的实例
  2. 附加 EBS 卷,执行 mkfs,安装在 /database
  3. 将数据复制到该卷,例如在 < code>/database/mysql
  4. 从 AMI Web 控制台创建此设置的映像。

现在,每次启动此映像时,我都会看到包含所有数据的卷。我只需将其安装在 /database 上,事情就开始了。

我不确定这对您是否有帮助,但您的问题似乎与此接近。


@NAD 评论后更新

是的,AMI 创建过程排除下面的内容

   /sys
   /proc
   /dev
   /media
   /mnt

所以,诀窍是不要在这些目录下包含您想要与 AMI 捆绑在一起的内容。

另外,如果您有想要在启动时自动挂载的卷,请在 fstab 中注册它

I once needed this sort of setting where I had to setup a MySQL on a EBS backed machine with data store in a separate EBS Volume. The AMI had to be such that every time you instanciate it, it should have the data volume (with static data in it) attached. This is how I did:

  1. Created an EBS backed instance from any existing image
  2. Attached a EBS volume, performed mkfs, mounted on /database
  3. Copied data to the volume, e.g. under /database/mysql
  4. Created image of this setup from AMI web console.

Now, every time I launch this image, I see the volume with all the data is there. I just mount it on /database and things get going.

I am not sure, if this is helpful to you but your problem seemed to close to this.


Update after @NAD's comment

Yeah, AMI creation process excludes stuffs that are under

   /sys
   /proc
   /dev
   /media
   /mnt

So, the trick is to not have stuffs that you want to bundle up with your AMI under these directories.

Also, if you have volume that you want to auto-mount at boot, register it in fstab

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文