将旧 EBS 卷安装到新实例 - Amazon EC2
1) 我有一个实例,但 sudo 命令无法正常工作,导致该实例上出现一些错误 所以我必须创建一个新实例。
2) 我想将旧的 EBS 卷与新实例一起使用并停止旧实例。
3) 我创建了一个新实例(新 EBS 卷是使用新实例自动创建的)
4) 我创建了旧卷的快照并附加了新实例。
5) 因此两个 EBS 卷附加了新实例。
6) 当我使用 SSH 登录新实例时,我在任何地方都看不到旧数据。
7)我想要新实例上的所有旧数据。
我的问题是…… 我如何在新实例中使用旧卷?
请帮助我..我从过去10个小时开始连续尝试:(..
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) I want to use old EBS volume with new instance and to stop old instance.
3) I created a new instance (New EBS Volume is created automatically with new instance)
4) I created snapshot of old volume and attached with new instance.
5) So two EBS volumes are attached with new instance.
6) When i login using SSH into new instance, i don't see old data anywhere.
7) I want every old data on new instance.
my question is.....
how i can use old volume with new instance?
please help me.. i am trying it from last 10 hours continuously :(..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要做的是将旧卷安装到新实例上。转到 Amazon EC2 控制面板,然后单击“卷”(在 Elastic Block Store 下)。查看旧 EBS 卷的附件信息。这将类似于(<实例名称>):/dev/sdg
记下此处给出的路径,以便在上面的示例中为 /dev/sdg。然后使用 SSH 并连接到您的新实例,然后输入
mkdir /mnt/oldvolume
,然后mount /dev/sdg /mnt/oldvolume
(或者在控制面板是)。您的文件现在应该位于/mnt/oldvolume
下。如果这不能解决您的问题,请在完成所有这些操作后再次发布 df 命令的输出。因此,回顾一下,要在实例上使用 EBS 卷,您需要使用控制面板(或 API 工具)将其附加到该实例,然后将其安装到实例本身。
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
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 thenmount /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 yourdf
command after doing all of this.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.