安装旧EBS卷到新的实例 - 亚马逊EC2 [英] Mounting Old EBS Volume to the new Instance - Amazon EC2

查看:184
本文介绍了安装旧EBS卷到新的实例 - 亚马逊EC2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1)我有一个实例,须藤命令不工作做一些错误在这种情况下 所以我不得不创建一个新的实例。

1) I had an instance and sudo commands were not working do to some mistakes on this instance so i had to create a new instance.

2)我想使用新的实例老EBS卷,并停止旧的实例。

2) I want to use old EBS volume with new instance and to stop old instance.

3)我创造(新的EBS卷是用新的实例自动创建一个新的实例)

3) I created a new instance (New EBS Volume is created automatically with new instance)

4)我创建了古卷的快照,并安装有新的实例。

4) I created snapshot of old volume and attached with new instance.

5)于是两个分别EBS卷附加新的实例。

5) So two EBS volumes are attached with new instance.

6)当我登录使用SSH连接到新的实例,我没有看到任何地方的旧数据。

6) When i login using SSH into new instance, i don't see old data anywhere.

7)我希望在新的实例每一位数据。

7) I want every old data on new instance.

我的问题是..... 我怎么可以使用旧卷与新的实例?

my question is..... how i can use old volume with new instance?

请帮我..我从过去的10全天候连续尝试它(..

please help me.. i am trying it from last 10 hours continuously :(..

推荐答案

您需要做的是挂载旧卷上的新实例。进入亚马逊EC2控制面板,然后单击卷(下弹性块存储)。看看附件信息老EBS卷。这将是类似于<实例ID> (小于实例名称>)是:/ dev / SDG

What you need to do is mount the old volume on the new instance. Go to the Amazon EC2 control panel, and click "Volumes" (under Elastic Block Store). Look at the attachment information for the old EBS volume. This will be something like <instance id> (<instance name>):/dev/sdg

请记下这里给出的路径,这样会是/ dev / SDG在上面的例子。然后使用SSH和连接到新的实例,然后键入的mkdir到/ mnt / oldvolume 然后设置/ dev / SDG的/ mnt / oldvolume (或者在控制面板中给出的路径是)。您的文件现在应该在的/ mnt / oldvolume 可用。如果这没有解决您的问题,请重新用你的东风命令的输出做了这一切之后发布。

Make a note of the path given here, so that'd be /dev/sdg in the example above. Then use SSH and connect to your new instance, and type mkdir /mnt/oldvolume and then mount /dev/sdg /mnt/oldvolume (or whatever the path given in the control panel was). Your files should now be available under /mnt/oldvolume. If this does not solve your problem, please post again with the output of your df command after doing all of this.

因此​​,要回顾一下,对一个实例使用EBS卷,您需要使用控制面板(或API工具)将其连接到该实例,而的将其安装在该实例本身。

So, to recap, to use an EBS volume on an instance, you need to attach it to that instance using the control panel (or API tools), and then mount it on the instance itself.

这篇关于安装旧EBS卷到新的实例 - 亚马逊EC2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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