- 最新
- 最多得票
- 最多評論
Hi,
Out of disk space could be the reason of the instance not being reachable using SSM. SSM agent might have stopped making it unable to let you connect via SSM.
To increase partition and Filesystem size inside the operating system :
[+] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html#extend-file-system
This can be done by detaching the root volume and attaching it as a secondary volume to another rescue instance.
NOTE: Make sure you take a backup before trying out the below steps
1)Detach root volume from the problematic instance. 2)Attach as secondary to another instance (.i.e., a rescue instance to be launched in the same Availability zone with similar instance configuration as problematic instance) 3)Inside this instance run the below commands to mount the volume as sudo user. Modify the below commands as per your device names.
# lsblk
# lsblk -f
Get the name, size, type, and mount point for the file system that you need to extend :
# df -hT
# growpart /dev/xvdf 1 (note that there is a space after /dev/xvdf)
Mount the volume under /mnt
# mount /dev/xvdf1 /mnt
If a xfs file system is being used, use :
# mount -t xfs -o nouuid /dev/xvdf1 /mnt
The commands to extend the file system differ depending on the file system type. Choose the correct command based on the file system type.
- XFS file system : # xfs_growfs -d /mnt
- Ext4 file system : # resize2fs /dev/xvdf1
Verify that the file system has been extended :
# df -hT
Refer the link for more information on extending file system : [+] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html
4)Once you notice the Filesystem size has increased, unmount the volume as below.
# umount /mnt
# df -h
5)Detach the volume from the rescue instance and attach back to original instance as root volume.
6)Start the EC2 instance
Monitor the EC2 screenshot feature and notice the operating system boots all the way up and the EC2 instance is healthy and passing all status checks.
相關內容
- 已提問 1 年前
- AWS 官方已更新 8 個月前
- AWS 官方已更新 3 年前
- AWS 官方已更新 1 年前