-
Notifications
You must be signed in to change notification settings - Fork 3
6. Troubleshooting
Eli Holmes edited this page Dec 3, 2021
·
2 revisions
First off you need to be able to ssh into your instance to troubleshoot it.
- Open a terminal on your computer
- cd into the diretory where you saved the SSH tokens that you made for your instances (when setting up your first instance)
- Use this code to ssh in. Replace
rs-workshop.cer
with whatever you named your key. Replaceec2...
with the similar public DNS address you see for your instance (on the EC2 instance dashboard)
ssh -i rs-workshop.cer ubuntu@ec2-34-214-164-213.us-west-2.compute.amazonaws.com
Ref this stackoverflow post
- From EC2 dashboard, go to the volume for your instance and make it bigger.
- ssh into the instance (see instructions above)
- Run
df -h
to verify that it's 100% full - Run
lsblk
and find the device and partition that is not at the new bigger size. It'll be something like `\dev\x - Create some space.
delete cache and unnecessary files
sudo apt-get autoclean
sudo apt-get autoremove
clear the tmp files
sudo mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp
- Grow the partition
sudo growpart /dev/xvda 1
Replace the device id (here\dev\xvda
with your device id. The # at end is the partition that needs to grow. - Resize
sudo resize2fs /dev/xvda1
- Unmount
sudo umount /tmp
- Reboot
sudo reboot
You might still have to reboot from the AWS dashboard. 4.