LinuxQuestions.org
Register a domain and help support LQ
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 08-12-2011, 11:24 PM   #1
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Rep: Reputation: 0
Angry 25G root partition losing space quickly


I don't understand why my root partition is filling up so quickly. All of my large files are downloaded to separate partitions.

Code:
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        25G   16G  7.8G  67% /
/dev/sda5       5.0G  160M  4.6G   4% /boot
/dev/sda7        79G  1.2G   74G   2% /usr/local
/dev/sda8       232G   37G  183G  17% /home
tmpfs           3.0G     0  3.0G   0% /dev/shm
fstab:
Code:
/dev/sda2        /NTFS            ntfs        auto,rw,owner    0   0
/dev/sda6        swap             swap        defaults         0   0
/dev/sda3        /                ext4        defaults         1   1
/dev/sda5        /boot            ext4        defaults         1   2
/dev/sda7        /usr/local       ext4        defaults         1   2
/dev/sda8        /home            ext4        defaults         1   2
/dev/sr0         /mnt/DROM        auto        owner,ro         0   0
#/dev/fd0        /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
I'm at a loss on this one. I cleaned my tmp folder already and don't know what else to check.
 
Old 08-13-2011, 12:03 AM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware
Posts: 496

Rep: Reputation: 213Reputation: 213Reputation: 213
Use du -chs <directory> to see directory sizes. For instance in my system:

Code:
# du -chs /usr
6.4G	usr
6.4G	total
# du -chs tmp
779M	tmp
779M	total
# du -chs /var
2.2G	var
2.2G	total
That should give you an idea what is taking so much space.
 
1 members found this post helpful.
Old 08-13-2011, 02:02 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
alternative:
Code:
du --max-depth=1 /
Run as root or the output will be polluted with errors about permissions

One possible cause is backups to mounted (external) disks. If the disk is actually NOT mounted while doing the backup, it will write data in the mount-point directory instead of on the mounted disk.

I've seen that happen (to others ) a couple of times.
 
Old 08-13-2011, 02:32 AM   #4
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Thanks.

Apparently, I grossly underestimated the space various libraries were using up (32compat libs).

Code:
[adx@GPC:/usr]$ du -hs * | sort -h
0       X11
0       adm
0       dict
0       spool
0       tmp
4.0K    X11R6
12K     x86_64-slackware-linux
2.0M    i486-slackware-linux
15M     info
54M     sbin
59M     man
113M    libexec
223M    include
428M    doc
434M    bin
553M    lib
892M    share
958M    local
1.8G    src
2.1G    lib64
I'll just remount /dev/sda7 as usr, that should clear around 7.5G. Even after that is taken care of there is still around 8G unaccounted for.. puzzling..

Code:
0       proc
0       sys
4.0K    NTFS
4.0K    lost+found
4.0K    opt
4.0K    srv
24K     mnt
48K     tmp
68K     media
276K    dev
12M     bin
14M     etc
16M     lib64
18M     sbin
22M     boot
47M     var
166M    root
226M    lib
7.5G    usr
37G     home
 
Old 08-13-2011, 02:40 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You are aware that df will still see files that are deleted but in use by applications while du doesn't.

You can run lsof |grep deleted to find them.
 
Old 08-13-2011, 02:18 PM   #6
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Wim Sturkenboom View Post
You are aware that df will still see files that are deleted but in use by applications while du doesn't.

You can run lsof |grep deleted to find them.
No, I didn't know that. Though, I ran the last command you gave and this was the result:

Code:
[root@x:/]# lsof | grep deleted
plugin-co 2535        adx   17u      REG                8,3      31472396    1218529 /tmp/FlashXX0jrcC5 (deleted)
I also attempted to remount /dev/sda7 as /usr instead of /usr/local and it didn't work out very well; bash couldn't locate any binaries in /bin.

I have no idea what to do now... try to re-size the partitions?
 
Old 08-13-2011, 03:43 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You need to undress your root partition. Basically unmount as much as possible and check again. Quite sure that you have some data hidden somewhere under a mount point. And that's either in the directory (not the partition) /home or /usr/local.

Not sure how safe it is to unmount /usr/local without crashing the system; might be possible in single user mode. Also not sure about /boot although I guess it's safe to unmount once your system has booted.

Alternatively, I would try with a live CD (or the Slackware CD will probably also work), mount sda1 and check with du. That way you're sure that there's nothing mounted on the mountpoints and therefore nothing will be hidden from you.

After that, I will be out of options.

Last edited by Wim Sturkenboom; 08-13-2011 at 03:59 PM.
 
  


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
where did the space under the root partition go? gongtech2006 Debian 6 01-19-2007 04:37 PM
Where did root partition space go? username is already Linux - General 3 12-15-2005 03:16 PM
Clone root to = or > partition on diff type hd quickly! suguru Linux - Software 13 08-09-2004 01:53 PM
/ root partition has 0 space?? adambeazley Mandriva 1 05-01-2004 10:53 PM
Root partition space @ 0% jbrashear Linux - Newbie 1 04-03-2004 01:52 AM


All times are GMT -5. The time now is 11:15 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