root filesystem reached 93%, need to free the space, help needed..please..
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
/var or /home is probably filling, and you can mount them on another partition. I don't know the policy you have on logs, so old logs can go if you don't need them. They can certainly be backed up and then deleted. If /lost+found is filling, your disk is bad (usually).
First place to look would be /tmp since it isn't a separate filesystem on your server it is part of /.
Files in /tmp are supposed to be temporary. If the file is older than a day and NOT CURRENTLY IN USE it generally safe to delete. You can determine if a file is in use by running "lsof <filename>" against the filename of the file you're interested in. I'd look for largest files first then smaller ones. Also check out any subdirectories in /tmp as often they contain large files when the directory itself is only showing something like 4096 bytes.
Another place to look would often be /var/tmp or /var/log but in your case /var IS a separate filesystem so files in those two directories are NOT part of /.
Typically if I'm not sure what is eating up space I'll do something like:
du -sxk * |sort -n
That will show you largest users of space at the bottom and the smallest at the top.
You should ignore anything that appears in this list that is a separate filesystem (e.g. /var, /ocr_shared/ocr_1, /boot etc...). The rest will be part of the filesystem.
Once you find subdirectories that are large (assuming you don't find individual files) you can cd to that directory then run the du command again to drill down on it.
What is "safe" to delete depends a lot on what it is and when it is needed. For example you'll find /usr takes up a lot of space but things like /usr/lib, /usr/bin should NOT be mucked with generally. On the other hand if you logs going into something like /usr/local/logs then files there might be "safe" to address so long as NOT CURRENTLY IN USE.
You seem to have an almost unused 2TB disk on /dev/sda, and, as noted, a VERY small amount of space for your root fs on /dev/sdb. (And, why is it on /dev/mapper? There's not much point in VM files for a one-disk set-up, and it doesn't look like you're using mdadm. What distribution are you using? From you handle, perhaps Red Hat? I use Fedora - Red Hat's "testing" distribution, and it defaults to using LVM for its install so they can get more testing of that system, but - if you don't have a dozen or so drives on your system - my personal opinion is that you should not use that default.)
On the other hand, if you ARE using LVM, you can fairly easily expand your 8GB partition by adding a new partition - maybe from you /dev/sda - to your (logical) root file system.
I disagree on the comments about LVM. Using it even on a single disk solution is good because it gets around limitations on number of partitions and especially on the amount of effort required if you want to add/resize partitions where others already exist. LVM allows you to add LVs or resize upward on the fly. (You can even resize downward but that takes a bit more care.)
The comments about the /recovery area aren't quite valid either. The space may appear to be underutilized but depending on how it is used may not always be avaialble. If for example this is something being used for Oracle Flash Recovery Area the utilization of the space can change quite drastically depending on the operations occurring in the DB.
It also isn't "available" space - it would have to be reclaimed (reduce the LV) then made "available" to add to other LVs.
However a good question was raised about the size of / itself. Based on this is the OP should show:
a) fdisk -l
b) vgdisplay -v
It may indicate whether there is other unused space that could be allocated to / (or better yet to putting things in their own filesystems like /tmp).