LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2009, 04:21 PM   #1
onesikgypo
Member
 
Registered: Jun 2008
Posts: 56

Rep: Reputation: 15
Trying to Figure Out Where All My Space Went?


Hi,

I have the following setup on my machine:

Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.5G  8.1G  921M  90% /
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/mapper/disk2     134G   97G   30G  77% /home

as you can see i have to main mounts, one on / and one on /home

what im concerned with is the space on /

i ran du -H, which in the end gave me these outputs:

107G /

from the same command i also recieved:

104G /home

THere seems to be some inconsistancy then - because df -h shows that ive only used 97GB n my /home mount. Now it appears that this extra "/home" data, is somehow eating into my mount on "/" which is causing significant problems for me.

Is anyone able to give me some advice about what is going on?

Thanks.
 
Old 10-06-2009, 04:35 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Well your first problem is you created / and /home, so everything else falls under / like /usr, /var, /tmp and so on. It's usually best to partition these out.

Try running a du -sh * in the / directory to get a better idea of which directory is taking up the most space.

If you did a full install of most major distro's, /usr is probably a good 5-6GB in size, which would be the bulk of it.

Last edited by trickykid; 10-06-2009 at 04:37 PM.
 
Old 10-06-2009, 04:45 PM   #3
onesikgypo
Member
 
Registered: Jun 2008
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Well your first problem is you created / and /home, so everything else falls under / like /usr, /var, /tmp and so on.
That was actually my intention in doing that way, since i knew the bulk of the data would lie in /home (a luks encrypted disc)

also i did forget to mention, i did check each individual folder, and nothing accounts for all the spaced used in /:

Code:
du -sh *
6.1M    bin
11M     boot
56K     dev
95M     etc
97G     home
120M    lib
16K     lost+found
4.0K    media
0       misc
4.0K    mnt
0       net
4.0K    opt
du: cannot read directory `proc/17293': No such file or directory
du: cannot read directory `proc/17315': No such file or directory
du: cannot read directory `proc/17317': No such file or directory
du: cannot read directory `proc/17318': No such file or directory
du: cannot read directory `proc/17319': No such file or directory
du: cannot read directory `proc/17320': No such file or directory
du: cannot read directory `proc/17323': No such file or directory
du: cannot read directory `proc/17340': No such file or directory
du: cannot read directory `proc/17346/task': No such file or directory
du: cannot read directory `proc/17346/fd': No such file or directory
du: cannot read directory `proc/17346/attr': No such file or directory
du: cannot access `proc/17346/coredump_filter': No such file or directory
du: cannot access `proc/17346/io': No such file or directory
0       proc
2.0M    root
27M     sbin
4.0K    selinux
4.0K    srv
0       sys
72K     tmp
1.7G    usr
178M    var
 
Old 10-06-2009, 04:49 PM   #4
bufo
LQ Newbie
 
Registered: Sep 2009
Posts: 7

Rep: Reputation: 0
Hi,

Looks like you have one partition containing both / and /home directories. If you check 'info du' the two options -H or -si and -h do not report the same number, one is in powers of 1024 the other human readable 1000. What you wanted is "df" command showing disk file system.

Regards
 
Old 10-06-2009, 04:51 PM   #5
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,273

Rep: Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587
This will tell you what really big files are on your system:

find / -size +10000

If you find anything truly huge, you might consider deleting it. But don't delete anything unless you know you don't need it.
 
Old 10-06-2009, 04:53 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
A common factor for "lost space" is people deleting files that are
still in use. Is that space issue consistent over re-boots?
 
Old 10-06-2009, 04:59 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by onesikgypo View Post
That was actually my intention in doing that way, since i knew the bulk of the data would lie in /home (a luks encrypted disc)
So when you get that runaway process that is sitting and filling up /var or /tmp, it won't only fill up /var or /tmp but it will fill up /, so it makes your machine useless. Still best practice to give /, /usr, /var, /tmp and possibly others their own partition.
 
Old 10-06-2009, 06:44 PM   #8
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by trickykid View Post
So when you get that runaway process that is sitting and filling up /var or /tmp, it won't only fill up /var or /tmp but it will fill up /, so it makes your machine useless. Still best practice to give /, /usr, /var, /tmp and possibly others their own partition.
For a desktop machine this is absolutely, completely false and very ill-advised. And it contradicts its premise -- if any of those partitions fills up, the system fails. The number of failure modes goes up as the number of partitions does.

Do not create a bunch of partitions for individual system directories. It serves no purpose and it suffers from the problem that one of them will fill up before the others, leaving you with an inoperative system with plenty of free space -- but on the wrong partitions.

Create as few partitions as possible -- one for the filesystem root (/) that includes /usr, /var, /tmp etc., one for swap, one for everything else. That way, you can update or replace your Linux distribution without having to backup and restore all your data files. Obviously you should back up anyway, but this saves an unnecessary read/write cycle.

I see this advice offered all the time, and later I see posts from people who follow the advice -- why is my system crashing, most of my partitions have plenty of space ... except one. The point is, when you have lots of partitions, one full partition is all it takes to bring your system down.

Remember this: configure as few partitions as practical. Three is a nice round number: About 20 GB for the system directory (this number will change over time), about 2 GB for swap (depending on how much RAM you have), the remainder for data.
 
Old 10-07-2009, 08:32 AM   #9
onesikgypo
Member
 
Registered: Jun 2008
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
A common factor for "lost space" is people deleting files that are
still in use. Is that space issue consistent over re-boots?
I managed to do a reboot and the space all free'd up - i believe i found the cause of the problem, though i disabled sendmail, things kept on showing up in /var/spool/clientmqueue - it hought deleting them would be the end of it, but i guess your saying if the system was still using them, the space wouldnt actually be free'd up.

So my question, if anyone could answer - is why would clientmqueue still be filling up, though the sendmail service has been switche off?
 
Old 10-07-2009, 04:06 PM   #10
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I'm not familiar with that process, I'd suggest locating the executable,
find which package it belongs to (btw, what distro are you using? ... it
would help with more targeted responses if you put that in your profile,
or explicitly mentioned it in the thread).

And then see how to stop whichever service is feeding it.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do we have any chance of calling user space callback function from kernel space? ravishankar.g Linux - Newbie 1 09-22-2009 08:14 PM
how to call socket prog code written in user space from kernel space???HELP kurt2 Programming 2 07-15-2009 10:56 PM
LXer: Worms in space: NASA confirms International Space Station infected LXer Syndicated Linux News 0 08-28-2008 10:40 AM
My harddisk usage is 91% but I cannot figure out what occupies so much space... Niceman2005 Linux - General 6 11-01-2005 03:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration