PDA

View Full Version : What's using space on root?



ketchukf
31-Aug-2011, 19:46
Hello. I have a SLES 11 SP1 server running GroupWise, and the root
partition filled up. I've freed up some space but I'm having a hard time
accounting for all the space that df tells me is used. du tells me that
there's about 1.8 GB of space used on root; df tells me there's 3.3 GB
used. Here are my partitions:


mail:~ # cat /etc/fstab
LABEL=boot /boot ext3 acl,user_xattr
1 2
/dev/disk/by-id/scsi-3600508e00000000075cb2e1d614cf10d-part5 swap
swap acl,user_xattr 0 0
/dev/system/root_lv / ext3 acl,user_xattr
1 1
/dev/system/opt_lv /opt ext3 acl,user_xattr
1 2
/dev/system/srv_lv /srv ext3 acl,user_xattr
1 2
/dev/system/tmp_lv /tmp ext3 acl,user_xattr
1 2
/dev/system/usr_lv /usr ext3 acl,user_xattr
1 2
/dev/system/var_lv /var ext3 acl,user_xattr
1 2
/dev/system/home_lv /home reiserfs acl,user_xattr
1 2
proc /proc proc defaults
0 0
sysfs /sys sysfs noauto
0 0
debugfs /sys/kernel/debug debugfs noauto
0 0
usbfs /proc/bus/usb usbfs noauto
0 0
devpts /dev/pts devpts mode=0620,gid=5
0 0
/dev/system/gwsystem /gwsystem ext3 acl,user_xattr
1 2

And here's the space used on each partition:


mail:~ # df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/system-root_lv
4.3G 3.3G 813M 80% /
devtmpfs 2.1G 140k 2.1G 1% /dev
tmpfs 2.1G 25k 2.1G 1% /dev/shm
/dev/sda3 208M 62M 135M 32% /boot
/dev/mapper/system-opt_lv
4.3G 1.2G 2.9G 30% /opt
/dev/mapper/system-srv_lv
4.3G 164M 3.9G 5% /srv
/dev/mapper/system-tmp_lv
3.2G 280M 2.8G 10% /tmp
/dev/mapper/system-usr_lv
8.5G 3.3G 4.8G 41% /usr
/dev/mapper/system-var_lv
6.4G 5.1G 928M 85% /var
/dev/mapper/system-home_lv
8.6G 3.1G 5.6G 35% /home
/dev/mapper/system-gwsystem
106G 61G 41G 61% /gwsystem
df: `/media/disk-1': No such file or directory

Here's the space used by directory:


mail:/ # du -sh *
3.4M backup
8.9M bin
54M boot
160K dev
75M etc
44K gwcache.db
56G gwsystem
2.8G home
97M lib
17M lib64
16K lost+found
1.2G media
8.0K mnt
1007M opt
du: cannot access `proc/6489/task/6489/fd/4': No such file or
directory
du: cannot access `proc/6489/task/6489/fdinfo/4': No such file or
directory
du: cannot access `proc/6489/fd/4': No such file or directory
du: cannot access `proc/6489/fdinfo/4': No such file or directory
du: cannot access `proc/6550': No such file or directory
0 proc
1.5G root
12M sbin
4.0K selinux
21M srv
0 sys
72K template
198M tmp
2.9G usr
du: cannot access `var/lib/ntp/proc/6489/task/6489/fd/4': No such file
or directory
du: cannot access `var/lib/ntp/proc/6489/task/6489/fdinfo/4': No such
file or directory
du: cannot access `var/lib/ntp/proc/6489/fd/4': No such file or
directory
du: cannot access `var/lib/ntp/proc/6489/fdinfo/4': No such file or
directory
du: cannot access `var/lib/ntp/proc/6605': No such file or directory
4.7G var
mail:/ #

If I eliminate everything from that list that's on a different
partition I'm left with this:


3.4M backup
8.9M bin
54M boot
160K dev
75M etc
44K gwcache.db
97M lib
17M lib64
16K lost+found
1.2G media
8.0K mnt
0 proc
1.5G root
12M sbin
4.0K selinux
0 sys
72K template

'media' is a Dell RD1000 backup cartridge.

What am I missing here?

Thanks.

Keith


--
ketchukf
------------------------------------------------------------------------
ketchukf's Profile: http://forums.novell.com/member.php?userid=4205
View this thread: http://forums.novell.com/showthread.php?t=443996

Jim Henderson
31-Aug-2011, 19:57
On Wed, 31 Aug 2011 18:46:02 +0000, ketchukf wrote:

> Hello. I have a SLES 11 SP1 server running GroupWise, and the root
> partition filled up. I've freed up some space but I'm having a hard time
> accounting for all the space that df tells me is used. du tells me that
> there's about 1.8 GB of space used on root; df tells me there's 3.3 GB
> used. Here are my partitions:

I would grab a copy of filelight and use it to analyze the usage. I find
it's a great tool to visually see where disk space is being used up.

http://software.opensuse.org/search?q=filelight&baseproject=SUSE%
3ASLE-11&lang=en&exclude_debug=true

This is the SLE11 version, but it should work fine on SLE11 SP1.

Jim

--
Jim Henderson, CNA6, CDE, CNI, LPIC-1, CLA10, CLP10

bbendily
01-Sep-2011, 15:56
ketchukf;2133405 Wrote:
> Hello. I have a SLES 11 SP1 server running GroupWise, and the root
> partition filled up. I've freed up some space but I'm having a hard time
> accounting for all the space that df tells me is used. du tells me that
> there's about 1.8 GB of space used on root; df tells me there's 3.3 GB
> used. Here are my partitions:
>
> What am I missing here?
> Thanks.
> Keith

There is a case/situation in linux where df shows space used, but du
does not.
The case is that, if you have a child-process that has deleted a bunch
of files and then the child-process goes away but parent process still
exist, the files have not been removed from the inode list, so it
appears your space is still in use. You should be able to either reboot,
or restart the service.
For example, this happens with apache from time to time.
...now that i'm thinking about it some more, the case for apache is
that, if apache has a log file it's writing to and you delete the log
file, apache still holds the file
open in memory and the system things the file exist. Restarting apache
will clear this up.

You may be able to find the space in use using the lsof command.
bb


--
bbendily
------------------------------------------------------------------------
bbendily's Profile: http://forums.novell.com/member.php?userid=16043
View this thread: http://forums.novell.com/showthread.php?t=443996

ketchukf
14-Sep-2011, 17:16
The problem is related to the backup disk, a Dell RD1000. Typically when
it's inserted it's mounted at /media/disk, but for whatever reason it
once mounted to /media/disk-1. Then, I think, the backup job tried to
write to /media/disk which didn't exist but was created on the root
partition. When the backup job ran it filled up root. I didn't see that
/media/disk was on the root partition because I 'knew' it was the
external disk.

Is there a command that lists directories and the disk partitions
they're on?

Thanks for the help.


--
ketchukf
------------------------------------------------------------------------
ketchukf's Profile: http://forums.novell.com/member.php?userid=4205
View this thread: http://forums.novell.com/showthread.php?t=443996

Jim Henderson
14-Sep-2011, 17:46
On Wed, 14 Sep 2011 16:16:02 +0000, ketchukf wrote:

> Is there a command that lists directories and the disk partitions
> they're on?

"mount" will tell you where partitions are mounted.

Jim



--
Jim Henderson, CNA6, CDE, CNI, LPIC-1, CLA10, CLP10