Notice: Degraded Amazon EC2 Instance

恐怖のメールがついに自分のAWS instanceに来ましたよっと。
会社アカウントで一度貰った事があるけれど、2週間前に作ったリザーブインスタンス@シンガポール(名前はsakuraちゃん)はちょっと障害が多い。
まず

http://twitter.com/#!/ayakomuro/status/51461870359547904
つながらなくなって、AWSコンソールで、Rebootしても接続不可。

同じリージョンに、別のinstanceを立ち上げて、Private IPアドレス経由でアクセスしようと試みたが不可。
こういう経緯があって、ついにAWSのプレミアムサポートBronzeに加入。


。・"(>0<)"・。ンモォ〜

という感じですが、チケット出したり、すぐ(程度にもよるけど)対応してくれるので、十二分に使おうかなと前向きにw

で、このsakuraちゃん宛にAWSからラブレターがっ!!

Hello,

We have noticed that one or more of your instances are running on a host degraded due to hardware failure.

i-0srf5a12

The host needs to undergo maintenance and will be taken down at 12:00 GMT on 2011-03-30. Your instances will be terminated at this point.

The risk of your instances failing is increased at this point. We cannot determine the health of any applications running on the instances. We recommend that you launch replacement instances and start migrating to them.

Feel free to terminate the instances with the ec2-terminate-instance API when you are done with them.

Sincerely,

The Amazon EC2 Team

なんとハードウェア障害ですと!?
しかもメンテナンスでインスタンスが落ちる(この時点でインスタンスが消える)のは2011/3/30 12:00 GMTとな。日本時間だと+8時間なので、3/30の20時?

不運続きなsakuraちゃんは、ついに消される事になりました.....

コマンドラインでイメージ作成

ec2-bundle-vol -d /mnt --privatekey pk-hogehoge.pem--cert cert-hogehoge.pem --user XXXX-XXXX-XXXX --fstab /etc/fstab

出来たイメージをS3にアップロード

ec2-upload-bundle --bucket ayaami --manifest /mnt/image.manifest.xml --access-key ACCESSKEYID --secret-key SECRETACCESSKEY

AMIとして登録

ec2-register ayaami/image.manifest.xml -n MyCoolAmi --private-key pk-hogehoge.pem --cert cert-hogehoge.pem

AWSコンソールから見るとAMI一覧に出ているので、起動させる。
sakuraから出来たイメージはtanpopoちゃんにしました。その後、疎通確認。
S3への投稿や、DBへの格納、imagemagick等の問題がなさそうだったので、DNSきりかえ。

sakuraちゃんはterminateしました。合掌。

ちなみにAWSの作業手順などはこちらのwikiにあります。参考になれば。。
http://popowa.com/wiki/index.php?AWS