Issue
When I log into my ec2 ubuntu instance, I can not download files. I see this error
OSError: No space left on device
When I run this
(python3) ubuntu@ip-172-30-1-208:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 30G 0 30G 0% /dev
tmpfs 6.0G 8.9M 6.0G 1% /run
/dev/xvda1 93G 93G 0 100% /
tmpfs 30G 0 30G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 30G 0 30G 0% /sys/fs/cgroup
/dev/loop0 92M 92M 0 100% /snap/core/8689
/dev/loop1 90M 90M 0 100% /snap/core/8039
/dev/loop2 18M 18M 0 100% /snap/amazon-ssm-agent/1480
/dev/loop4 18M 18M 0 100% /snap/amazon-ssm-agent/1566
tmpfs 6.0G 24K 6.0G 1% /run/user/1000
It looks like all my hard disk, 93G is taken up by xvda1
. Am I reading this right?
Solution
The root file system is full
Usually, this happens on servers when the logging goes awry
My tip is, log in, become root and then cd /var/log
and run du -smc *
This may well take a while but will show you where the big logs are
Note that deleting an in-use logfile will not usually free up disk space
Answered By - Vorsprung Answer Checked By - David Goodson (WPSolving Volunteer)