(dv):Resolve out of disk space errors

  • This page was last modified on June 13, 2011, at 11:46.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Contents

Overview

You may have found that your (dv) is all of a sudden out of diskspace. This can result in all sorts of problems and you definitely want to resolve it ASAP. Here are the steps I'd suggest.

Add temporary space

First, follow this article on how to add some temporary space. In most cases, this is going to give you the "wiggle room" needed to allow your server to function normally while you tackle the greater issue.

Find large files

Once the additional temporary space has been allocated, you have 6 hours to work with the space. Time to see what's taking up all the space! I suggest the script line:

 find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' |sort -n 

This line is taken from (mt)'s SSH wiki article, Common SSH Commands. This command locates all files over 100MB. Note: Not all of these files are safe to remove. But if you can see by looking at it that they are, please delete. Two of the most common culprits I've seen: Tons of backups and huge error logs.

Prevention

Make sure steps are in place to avoid those two culprits I mentioned.

A. Limit the number of backups that can be kept.

Plesk 8.6.0.jpg

B. Enable log log rotation. For more information, take a gander at this article (dv) Configuring log rotation.

Restart

If you remove some of these large files that were discovered with the SSH command, I expect you made a good deal of space on your server. Once you have fallen below your (dv)'s high disk space level, and have steps in place to not quickly exceed it, I suggest a reboot of the server in full.

You can reboot your server via the AccountCenter, Plesk, or SSH as you prefer. For more information, please read this aricle: (dv) How can I reboot my server? I like giving all my services a fresh start because Plesk is only good at letting me know when a service has fully failed. In my experience, I find that disk space problems occasionally seem to degrade the functionality of some services, such as email instead of shutting them down entirely.