LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-28-2010, 04:17 PM   #1
Riallin
Member
 
Registered: Feb 2005
Posts: 52

Rep: Reputation: 16
Can't find where all my space is going


Hey everyone,

Background on this issue: I, in a fit of stupidity, deleted all files in the /var/log folder due to it filling up all the time and me ending with 100% full hard drive. I am running this computer simply as a router (dhcp, shorewall), and my 300gb hard drive keeps filling up (with no reason, as I have no programs running that [i think] would fill up the log folder [anymore...]).

Also, these commands were run within one day of restarting. When I shutdown initially it told me it was 100% full, and upon restart it claimed 61%. At the time of writing, it now claims to be 86% full (due to *HUGE* log files, that are now in the /var/log folder, so that will explain about 90gb of difference in size between the first and last command seen here... I am working on figuring out how to use logrotate to limit log file size, because that was the initial problem I tried to fix [by rm -rf /var/log/*] and is still an issue). But, the problem I am asking about here is where are the hidden ~200gb?


root@sloan:/# du -sh *
4.2M bin
15M boot
0 cdrom
656K dev
7.1M etc
9.7M home
0 initrd.img
68M lib
16K lost+found
8.0K media
8.0K mnt
4.0K opt
du: cannot access `proc/3917/task/3917/fd/3': No such file or directory
du: cannot access `proc/3917/task/3917/fdinfo/3': No such file or directory
du: cannot access `proc/3917/fd/3': No such file or directory
du: cannot access `proc/3917/fdinfo/3': No such file or directory
0 proc
92K root
3.6M sbin
4.0K selinux
4.0K srv
0 sys
20K tmp
2.2G usr
2.2G var
0 vmlinuz


root@sloan:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 367G 211G 138G 61% /
tmpfs 122M 0 122M 0% /lib/init/rw
udev 10M 656K 9.4M 7% /dev
tmpfs 122M 0 122M 0% /dev/shm


root@sloan:/# du -h / | grep ^[1-9][0-9][0-9][0-9.]*G | sort -rn
du: cannot access `/proc/5101/task/5101/fd/3': No such file or directory
du: cannot access `/proc/5101/task/5101/fdinfo/3': No such file or directory
du: cannot access `/proc/5101/fd/3': No such file or directory
du: cannot access `/proc/5101/fdinfo/3': No such file or directory

root@sloan:/# du -h / | grep ^[1-9][0-9][0-9.]*G | sort -rn
du: cannot access `/proc/5039/task/5039/fd/3': No such file or directory
du: cannot access `/proc/5039/task/5039/fdinfo/3': No such file or directory
du: cannot access `/proc/5039/fd/3': No such file or directory
du: cannot access `/proc/5039/fdinfo/3': No such file or directory

root@sloan:/# du -h / | grep ^[1-9][0-9.]*G | sort -rn
du: cannot access `/proc/5070/task/5070/fd/3': No such file or directory
du: cannot access `/proc/5070/task/5070/fdinfo/3': No such file or directory
du: cannot access `/proc/5070/fd/3': No such file or directory
du: cannot access `/proc/5070/fdinfo/3': No such file or directory
6.8G /
4.5G /var
3.1G /var/log
2.2G /usr
1.4G /usr/share
1.2G /var/cache/apt
1.2G /var/cache
1.1G /var/cache/apt/archives


root@sloan:/# ls -lah
total 88K
drwxr-xr-x 21 root root 4.0K 2010-01-26 17:31 .
drwxr-xr-x 21 root root 4.0K 2010-01-26 17:31 ..
drwxr-xr-x 2 root root 4.0K 2009-08-11 20:23 bin
drwxr-xr-x 3 root root 4.0K 2009-11-05 15:50 boot
lrwxrwxrwx 1 root root 11 2009-08-11 16:27 cdrom -> media/cdrom
drwxr-xr-x 14 root root 3.4K 2010-01-26 17:37 dev
drwxr-xr-x 115 root root 4.0K 2010-01-26 17:38 etc
drwxr-xr-x 5 root root 4.0K 2009-09-29 13:45 home
lrwxrwxrwx 1 root root 28 2009-08-11 16:29 initrd.img -> boot/initrd.img-2.6.26-2-686
drwxr-xr-x 14 root root 4.0K 2009-11-05 15:45 lib
drwx------ 2 root root 16K 2009-08-11 16:27 lost+found
drwxr-xr-x 3 root root 4.0K 2010-01-26 17:31 media
drwxr-xr-x 3 root root 4.0K 2009-08-11 20:05 mnt
drwxr-xr-x 2 root root 4.0K 2009-08-11 16:27 opt
dr-xr-xr-x 106 root root 0 2010-01-26 17:26 proc
-rw------- 1 root root 1.0K 2009-08-11 17:16 .rnd
drwxr-xr-x 11 root root 4.0K 2009-11-02 16:34 root
drwxr-xr-x 2 root root 4.0K 2009-11-05 15:45 sbin
drwxr-xr-x 2 root root 4.0K 2008-09-16 02:38 selinux
drwxr-xr-x 2 root root 4.0K 2009-08-11 16:27 srv
drwxr-xr-x 11 root root 0 2010-01-26 17:26 sys
drwxr-xr-x 5 root root 4.0K 2010-01-26 17:42 tmp
drwxr-xr-x 11 root root 4.0K 2009-08-11 17:02 usr
drwxr-xr-x 15 root root 4.0K 2009-11-04 09:51 var
lrwxrwxrwx 1 root root 25 2009-08-11 16:29 vmlinuz -> boot/vmlinuz-2.6.26-2-686



Attached: du -h * > files | split -l 6000 files | cat xaa > files-1.txt | cat xab xac > files-2.txt
Attached Files
File Type: txt files-1.txt (253.8 KB, 12 views)
File Type: txt files-2.txt (227.2 KB, 11 views)
 
Old 01-28-2010, 04:30 PM   #2
Riallin
Member
 
Registered: Feb 2005
Posts: 52

Original Poster
Rep: Reputation: 16
Posted my logrotate issues here: http://www.linuxquestions.org/questi...5/#post3844172
 
Old 01-28-2010, 04:39 PM   #3
jns
LQ Newbie
 
Registered: Sep 2009
Location: NC
Distribution: fedora
Posts: 18

Rep: Reputation: 0
What is the output of 'fdisk -l'?
 
Old 01-28-2010, 04:54 PM   #4
jns
LQ Newbie
 
Registered: Sep 2009
Location: NC
Distribution: fedora
Posts: 18

Rep: Reputation: 0
Also I think your /tmp perms could be wrong, if I'm reading your output correctly. Try drwxrwxrwt.
 
1 members found this post helpful.
Old 01-28-2010, 07:05 PM   #5
Riallin
Member
 
Registered: Feb 2005
Posts: 52

Original Poster
Rep: Reputation: 16
sloan:~# fdisk -l

Disk /dev/hda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x775db1dc

Device Boot Start End Blocks Id System
/dev/hda1 * 1 48551 389985876 83 Linux
/dev/hda2 48552 48641 722925 5 Extended
/dev/hda5 48552 48641 722893+ 82 Linux swap / Solaris


Changed permissions for /tmp to 777, I'll see if that helps any (it did allow me to finally check my mail, which was particularly nice to see stuff from back in October when the error first started).
And I checked inodes just now too... definitely didn't help:

sloan:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/hda1 24379392 145793 24233599 1% /
tmpfs 31034 4 31030 1% /lib/init/rw
udev 31034 1225 29809 4% /dev
tmpfs 31034 1 31033 1% /dev/shm
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find used drive space IceTerminal Linux - Software 6 07-01-2009 01:58 AM
find where space is being used? mattsoftnet Linux - Software 6 04-02-2006 03:23 AM
Find dir space yhus Programming 10 03-14-2006 07:32 AM
how to find directories with a space in it :P ToBe Linux - General 4 01-05-2005 01:10 PM
how do i find out what space my hd is waheedrafiq Linux - General 13 06-08-2003 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:47 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
Open Source Consulting | Domain Registration