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.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/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:
cd /
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 might want to reinstall
that 7.8 gig partition is ALWAYS going to cause some problems
It is a bit too small
the very bare minimum size is normally 9 Gig
With 15 to 20 Gig preferred
normally the log files end up eating space
set cron to remove old files in/var/log/??????
and to remove old /tmp files( any older that two days or if still in use, sense before the last reboot)
also is there a NEED for all those 341 MEG partitions sdb1 through 7
you might want to use a LVM for this unnamed operating system
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.