AWS Troubleshooting
イシュー
EC2 のインスタンスステータスのチェックでエラー
- システムログを見ると SELinux policyでエラー
[ 5.089902] systemd[1]: Failed to load SELinux policy.
- よくある質問 - Amazon EC2 インスタンス | AWS
- SELinuxをCentOS 7 で有効化・無効化 (disabled, enforcing, permissive, setenforce) 停止の確認、設定 | urashita.com 浦下.com (ウラシタドットコム)
- Linux で Amazon EBS ボリュームを使用できるようにする - Amazon Elastic Compute Cloud
ボリュームを切り離して、別EC2で接続しようとしたが、そのままではマウントできない
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 10G 0 disk ├─xvda1 202:1 0 1M 0 part └─xvda2 202:2 0 10G 0 part / xvdf 202:80 0 30G 0 disk ├─xvdf1 202:81 0 1M 0 part └─xvdf2 202:82 0 30G 0 part $ sudo file -s /dev/xvdf /dev/xvdf: x86 boot sector; partition 1: ID=0xee, starthead 0, startsector 1, 62914559 sectors, extended partition table (last)\011, code offset 0x63
参考
- [AWS] XFSフォーマットのEBSを拡張して、認識させる方法 : 元うなぎ屋
- EC2 に ssh できない -> EBS 付け替えてレスキューした話 - dskst's diary
- AWSのLinuxインスタンスにログインできなくなった時の対処法 - Qiita
# df -T Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/xvda2 xfs 10473452 1002912 9470540 10% / devtmpfs devtmpfs 488224 0 488224 0% /dev tmpfs tmpfs 507480 0 507480 0% /dev/shm tmpfs tmpfs 507480 12984 494496 3% /run tmpfs tmpfs 507480 0 507480 0% /sys/fs/cgroup tmpfs tmpfs 101496 0 101496 0% /run/user/1000 tmpfs tmpfs 101496 0 101496 0% /run/user/0
# dmesg | tail [ 3300.518961] XFS (xvdf2): Filesystem has duplicate UUID 00a738da-7c2a-458c-83c0-2420aaed3b8a - can't mount
- 別EC2に起動できないEC2のボリュームをマウントして内容を確認
#mount -t xfs -o nouuid /dev/xvdf2 /mnt/data
- 結果:SELinuxの設定()の記載ミスがあった。修正して再起動したら起動した。
突然EC2に接続できなくなる
参考
- 接続できないインスタンスのトラブルシューティング - Amazon Elastic Compute Cloud
- ステータスチェックに失敗したインスタンスのトラブルシューティング - Amazon Elastic Compute Cloud
EBでEFS使用時のエラー
The following resource(s) failed to create: [MountTargetC, MountTargetA, MountTargetB].