所以上周,EC2上的一个实例停止了响应,我仍然不知道为什么,因为我不能再SSH进入,我怀疑被挂载到另一个驱动器的/ tmp /目录不能再被访问,原因不明。
我有一些非常重要的文件,我需要离开这台服务器…
我仍然能够在AWS控制台中取得日志,这里有一些非常相关的行(我仍然可以重新启动服务器):
Welcome to CentOS release 5.4 (Final) Press 'I' to enter interactive startup. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Setting clock : Thu Dec 29 13:52:43 EST 2011 [ OK ] Starting udev: [ OK ] Setting hostname localhost.localdomain: [ OK ] No devices found Setting up Logical Volume Management: File descriptor 7 (/sys/kernel/hotplug) leaked on lvm.static invocation. Parent PID 232: /bin/bash [ OK ] Checking filesystems Checking all file systems. [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/sda1 /dev/sda1: clean, 202786/1310720 files, 1428718/2621440 blocks [ OK ] Remounting root filesystem in read-write mode: [ OK ] Mounting local filesystems: [ OK ] Enabling local filesystem quotas: [ OK ] chown: cannot access `/tmp/.ICE-unix': No such file or directory Enabling /etc/fstab swaps: [ OK ] INIT: Entering runlevel: 4 Entering non-interactive startup Starting background readahead: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Determining IP information for eth0...mktemp: cannot create temp file /tmp/wnt890: No such file or directory /sbin/dhclient-script: line 57: $rscf: ambiguous redirect /sbin/dhclient-script: line 62: $rscf: ambiguous redirect /sbin/dhclient-script: line 69: $rscf: ambiguous redirect done. [ OK ] Starting getsshkey: /etc/rc4.d/S11getsshkey: line 12: /tmp/my-key: No such file or directory getting ssh-key... /etc/rc4.d/S11getsshkey: line 17: /tmp/my-key: No such file or directory getting ssh-key...
我敢肯定它不是一个防火墙问题。 这是nmap的输出
[root@ip-xxxxxxxxx ~]# nmap -sS -P0 xxxxxxxxxxx Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-12-29 16:32 EST Interesting ports on xxxxxx (xxxxxxxxx): Not shown: 1675 filtered ports PORT STATE SERVICE 22/tcp closed ssh 25/tcp closed smtp 80/tcp closed http 443/tcp closed https 8000/tcp closed http-alt
我不认为在这里要求任何人帮助你“入侵服务器”特别有利于解答。
塔达! 你刚刚恢复了数据,没有涉及黑客行为。
这里的一些工具可能有帮助
无法访问实例时,访问和修复EBS根卷的基础知识(例如,编辑/ etc / fstab)为:
这里有一篇文章我写了更多的细节,包括示例命令行如何摆脱这样的情况:
修复EC2实例的根EBS卷上的文件
http://alestic.com/2011/02/ec2-fix-ebs-root
这只适用于EBS启动实例。 我不build议运行实例存储,因为它可以让你陷入这样的情况,无法恢复你的数据。
所以我的数据实际上存储在实例本身,所以这些都不起作用。 实际的解决scheme基本上是注册AWS的支持,也许得到你的数据。 以下是EC2 Instance FAQ的摘录
“数据恢复实例存储的数据恢复通常是不可能的,尽pipe如果实例未被终止并且没有底层硬件问题,AWS Premium Support可能能够恢复某些部分的数据。虽然数据恢复不是一个有保证的过程而且可能需要数天时间才能完成,所以不要将AWS Premium支持数据恢复的可能性作为您的唯一备份策略。“