Deploy says disk full when the disk is not actually full

December 4, 2015 1.2k views
Deployment DigitalOcean Ruby on Rails

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?

1 Answer


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 :-).

  • Thanks for the reply. In my question you can see I ran df -i and we are not full there.

Have another answer? Share your knowledge.