Quick Review: Boxee Box
December 27, 2011 – 12:22 am | 3 Comments

Some of the technical issues with Boxee Box could have been fixed if the dev team was paying more attention to addressing the bugs rather than adding “features” of dubious value. In the final analysis, for the price and ease of use, Boxee Box is the best in its class and price range. You just need to be mindful of its limitations and buy it in hope of future improvements to its usability.

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells, Files

Dealing With Disk Hogs

Submitted by on June 1, 2008 – 5:49 pmNo Comment
Dealing With Disk Hogs

Some users and application developers believe that any free disk space on the server belongs to them. Suddenly you get an email alert saying that a server “xyz” ran out of disk space in /home. You need to take care of this quickly, otherwise user sessions and applications may start crashing. Even if you have no more disk space to give them, there are a few things you can do to temporarily correct the problem.

The first step is usually to check for large files that were recently modified. The command below will find all files in /home that were modified in the past two days and that are larger than 10Mb. The results will be sorted by file size, with largest files at the top.

find /home -type f -mtime -2 -size +10240k -exec ls -als {} \; | sort -rn

Now you can contact the guilty users and tell them to clean up their junk. Or else. If you can’t get a hold of the file owners, the best way is to move these large files elsewhere and put a soft link to the new location. Make sure to preserve ownership and permissions when you move the files, to ensure that users can access them at the new location. Alternatively, you can just compress the files in place (if you still have enough disk space) and notify the users.

The next step is to see if there are any recent core dumps left behind by user applications:

find /home -type f -mtime -2 -name "core" -exec ls -als {} \; | sort -rn

If you don’t need any of them, then you can easily remove them:

find /home -type f -mtime -2 -name "core" -exec rm {} \;

But what if the problem is being caused not by a few huge files, but by a whole bunch of small ones? It’s a good idea to get the break down of filesystem space utilization by top-level directories. This way you can see if any particular folder is eating up an unusually large chunk of disk space:

find /home -type d -maxdepth 1 -exec du -sh {} \; | sort -rn | grep -v "/home$"

This will give the list of directories in /home sorted by the amount of space they use. Now you can pick the largest ones and concentrate your attention there.

You can find more information on dealing with out-of-disk-space situations here.

Popularity: 2% [?]

Related posts:

  1. Create boot block on Solaris disk
  2. Tips on dealing with the Bagle rootkit
  3. Solaris boot disk copy
  4. Solaris boot disk copy using dd
  5. Copying directories using tar and rsync
  6. Dealing with ReiserFS bad blocks

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.