By zolson
I’m trying to deploy an update to our rails app on a digital ocean box. When I run cap deploy I get the errors:
error: file write error (No space left on device)
fatal: unable to write sha1 file
fatal: unpack-objects failed
When I run df I see that we are only using 15% of our disk space:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 41151808 5500720 33537664 15% /
none 4 0 4 0% /sys/fs/cgroup
udev 1014128 4 1014124 1% /dev
tmpfs 205000 360 204640 1% /run
none 5120 0 5120 0% /run/lock
none 1024980 0 1024980 0% /run/shm
none 102400 0 102400 0% /run/user
df -i reveals:
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 2621440 176278 2445162 7% /
none 256245 2 256243 1% /sys/fs/cgroup
udev 253532 402 253130 1% /dev
tmpfs 256245 325 255920 1% /run
none 256245 1 256244 1% /run/lock
none 256245 1 256244 1% /run/shm
none 256245 3 256242 1% /run/user
I’ve tried deleting log files and rebooting the box with no luck. Any ideas on why it thinks our disk is full?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
First, I would cd / and then run:
du -h --max-depth=1 | sort -hr
The above command simply outputs the command you’ve run above in a more readable format that’s easier to interpret. If nothing looks out of place (feel free to post the output in a reply), then I would run:
df -i
This command checks inode usage. You could have 10GB out of 20GB left on your Droplet, though if your inode count is at 100%, you’ll see this kind of a error and you won’t be able to write to the disk.
If this happens to be the case, now would be the time to start cleaning up the server. Anything from a set of files you don’t need, temporary files (inside and outside of /tmp), removing packages you don’t need, running apt-get autoremove to remove packages that are no longer needed etc.
You can run:
du -ah / | sort -r -h | head -n 10
To scan and return the 10 largest, which should give you an idea of where the issue may be. From there, if you have any questions about what to remove and what not to remove, feel free to reply back :-).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.