问题原文
原帖链接 · Shaugi · CC BY-SA 4.0
i am facing connectivity issues with my AWS EC2 instance after resizing its volume. Here's what I did:
I had an EC2 instance running Ubuntu in a container with a full storage. I modified the volume to a larger size. Followed the steps in this link
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html[link][1]
to resize the disk. After resizing, I encountered an error while trying to run sudo:
sudo: unable to resolve host ip-xxx-xx-xx-xx: Name or service not known
A user in a forum suggested that it might be due to the full disk issue, which I had recently faced.
To resolve this, I rebooted the instance from the AWS console. However, after the reboot, I am unable to connect to the instance either through SSH or AWS console connect.
Interestingly, I created a new instance using the same security group, and it works perfectly. But, I still can't connect to the old instance.
Any insights into what might be causing this issue and how to resolve it would be greatly appreciated.
已采纳解答
原帖链接 · Shaugi · CC BY-SA 4.0
I manage to solve the issue with this steps :
- Delete unnecessary file
Since the original issue was caused by a full disk, the first step was to reduce the storage usage. A new EC2 instance was created, and the original volume was attached as a secondary volume.
- Connect to new instance
Connect to the new instance using SSH or AWS console connect.
- Delete unnecessary files
Once connected to the new instance, identify and delete unnecessary files from the original volume to free up space.
- Reattach volume to old instance
After freeing up space, detach the volume from the new instance and reattach it to the old instance.
- Connect to old instance
Attempt to connect to the old instance again. This time it should work without any issues.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
