简体   繁体   English

EC2实例,“常规错误挂载文件系统”

[英]EC2 Instance, “General error mounting filesystems”

I have a AWS micro instance running Ubuntu 12.04 LTS and last night when I SSH in, I did apt-get update and it gave me an error (I don't recall which). 我有一个运行Ubuntu 12.04 LTS的AWS微型实例,昨晚进行SSH时,我做了apt-get更新,但它给了我一个错误(我不记得是哪个错误)。 So I thought I would give my instance a reboot. 所以我想我应该重新启动实例。 This morning, it says that my instance has failed an Instance Sstaus Check and I am unable to SSH into it. 今天早上,它说我的实例未通过实例Sstaus检查,并且我无法通过SSH进入它。 The bottom of my system log is below. 我的系统日志的底部在下面。 Is there any way to save this and if not, anyway to save the data? 有什么方法可以保存此数据,如果没有,则可以保存数据吗?

Thank you! 谢谢!

Loading, please wait...
[35914369.823672] udevd[81]: starting version 175
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[35914370.187877] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
[35914373.347844] init: mountall main process (183) terminated with status 1
General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance
(or type Control-D to continue): 

It depends on how badly broken the filesystem is. 这取决于文件系统的损坏程度。

You can start a new instance in AWS and then attach the EBS volume to your new instance. 您可以在AWS中启动新实例,然后将EBS卷附加到新实例。 That may help you recover the data. 这可以帮助您恢复数据。

Don't terminate the instance, otherwise you could lose the filesystem completely. 不要终止实例,否则您可能会完全丢失文件系统。

Always use the "Create AMI" option of a running instance before doing an apt-get update/upgrade or yum update/upgrade. 在执行apt-get更新/升级或yum更新/升级之前,请始终使用正在运行的实例的“ Create AMI”选项。 This way, if your system fails to come up after a reboot (after the update), you can spin up a 'before' version (ie bootable) instance using the AMI you just created. 这样,如果系统在重启(更新后)后无法启动,则可以使用刚创建的AMI启动“以前”版本(即可启动)的实例。

In this case, Ubuntu probably tried to install a new kernel and/or ram file system (ramfs) and since this is an AWS virtual machine with kernel and ramfs dependencies, the standard Ubuntu build probably did not meet those dependencies and your virtual machine is now toast. 在这种情况下,Ubuntu可能尝试安装新的内核和/或ram文件系统(ramfs),并且由于这是一个具有内核和ramfs依赖关系的AWS虚拟机,因此标准的Ubuntu构建可能不满足这些依赖关系,并且您的虚拟机是现在敬酒。

As mentioned, if you need to recover data from the unbootable system, mount it's EBS volume to a working system. 如前所述,如果您需要从无法启动的系统中恢复数据,请将其EBS卷挂载到工作系统上。 It may complain that it is in use. 它可能会抱怨它正在使用中。 If so, and to keep the EBS volume, you must check the option that lets you preserve the volume before you terminate it. 如果是这样,并且要保留EBS卷,则必须在终止卷之前选中允许保留该卷的选项。 The default on termination of an instance is to destroy it's EBS volume because, the assumption is, you booted from an EBS backed AMI that you previously (or regularly) created. 实例终止时的默认设置是销毁它的EBS卷,因为假设是从先前(或定期)创建的EBS支持的AMI引导。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM