AWS Troubleshooting

イシュー

EC2 のインスタンスステータスのチェックでエラー

  • システムログを見ると SELinux policyでエラー
[    5.089902] systemd[1]: Failed to load SELinux policy.

ボリュームを切り離して、別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

参考

# 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に接続できなくなる

参考

EBでEFS使用時のエラー

The following resource(s) failed to create: [MountTargetC, MountTargetA, MountTargetB].

vsftpサーバーを立てたが起動できない

ubuntussh接続する場合はubuntu