I have a 25 gb disk storage on ec2 instance. Im unable to connect to the ec2 instance using the remote ssh on vs code, the error I get is as follows:
mkdir: cannot create directory ‘/home/ubuntu/.vscode-server/bin/62xxxx..b’: No space left on device
How do I clear memory If I cannot connect?
I’m not sure if adding extra memory is the solution here? I added a 2gb disk but that didn’t help.
I have tried rebooting and force stopping the ec2 instance. It reboots and starts however, Im unable to connect to it.
2
Answers
It’s difficult to resolve this if the EC2 instance is unresponsive and you can’t access it:
A few solutions, depending on your requirements:
Amazon Linux AMIs (and some other ones) will automatically expand the root partition during system startup. Therefore, you can try the following:
This should allocate more space to the root partition.
Then, try connecting again and it should work.