Checking Storage Space in linux

Checking Storage Space

It is important to check from time to time that adequate free space remains on the storage devices. Use the df command to get a report of available space. It will look as follows (information shown is from the Internet server at my place of employment):

Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/sda1            1888052  135908  1654551      8%   /
/dev/sdd1            4299828  100084  3977246      2%   /archive
/dev/hda2            3048303  897858  1992794     31%   /archive2
/dev/hda1              11677    1380     9694     12%   /boot
/dev/sdc1            4299828  350310  3727020      9%   /home
/dev/sdb1            4299828  598504  3478826     15%   /usr
/dev/sda2            1888083  700414  1090075     39%   /var
/dev/scd0             593958  593958        0    100%   /cdrom

These file-systems are pretty stable in that they have a fairly slow growth pattern.

The / (aka root) file-system, mounted on /dev/hda1, contains the Linux kernel, device drivers, and other directories. It also is where user mail messages are stored (/var/spool/mail/) as well as log files (/var/adm/) but as mail messages are received and log files are recycled, the available capacity stays fairly stable (an estimated growth of about 1% per month). Log files are rotated and purged automatically on a weekly basis, so you’ll always have about a month’s worth of log information available to you.

Tip: Tip: If this file-system is growing rapidly, concentrate your efforts in the /var/spool/mail directory — look for huge mailboxes (something like “find /var/spool/mail -size +1000k” would display a list of mailboxes larger than 1Mb in size). If you find a file much larger than 1,000,000 bytes in size, the user probably isn’t retrieving their mail, is on a high-volume mailing list, or their e-mail package isn’t configured to remove the mail from the server. Contact the user and/or clear the mail file, using > mailbox, (eg. “>smithj” to clear Joe Smith’s mail box). Also check the “/tmp/” directory, which may need to be cleaned out on an occasional basis (usually old tin* files left over from aborted newsreader sessions, old print files, etc).

reference: http://www.tldp.org/LDP/lame/LAME/linux-admin-made-easy/checking-storage-space.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

WordPress.com.

Up ↑

%d bloggers like this: