Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 03-25-2008, 02:30 PM   #1
LQ Newbie
Registered: Mar 2003
Posts: 14

Rep: Reputation: 0
Missing hard drive free space

I have a couple servers that are running low on disk space, but I can't figure out what is consuming the space. These are using LVM, but I don't know a lot about LVM yet so I can't determine if it may be part of the issue or not (though it doesn't look like it based on the output that I will post below). If I do a df -h, it tells me that / has 57G used:

[root@zeus01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                       66G   57G  5.1G  92% /
/dev/sda1              99M   14M   80M  15% /boot
none                  501M     0  501M   0% /dev/shm
However if I do a "du -hs /" it tells me that there is only 24GB of data:

[root@zeus01 ~]# du -hs /
24G     /
There is nothing mounted that would mask the amount of data:

[root@zeus01 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
Here's some LVM info:

[root@zeus01 ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VolGroup00
  PV Size               68.12 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              2180
  Free PE               2
  Allocated PE          2178
  PV UUID               ibUQJu-HayX-U3qK-8Me4-HbQB-MCiA-08SXxr

[root@zeus01 ~]# vgdisplay
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               68.12 GB
  PE Size               32.00 MB
  Total PE              2180
  Alloc PE / Size       2178 / 68.06 GB
  Free  PE / Size       2 / 64.00 MB
  VG UUID               Xzi1d1-sJdh-7WAS-mB9T-nKGP-85aF-ItuDJ6

[root@mxfarm /]# lvdisplay
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                mxK5MZ-favb-4jGg-q4q4-1C75-5Wg6-4VUDft
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                63.34 GB
  Current LE             2027
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                ah30ar-XpRl-BhbE-zGmS-7vJ9-9Cic-tVDKp3
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                4.25 GB
  Current LE             136
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1
Googling & searching the forum haven't turned up anything similar. I'm pretty much stumped on this one, so I'm hoping someone might have some insight.

Old 03-25-2008, 03:01 PM   #2
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
I didn't think you could accurately du on /? Regardless, what do you get if you du the folders in / rather than / itself, i.e.

cd /
du -h --max-depth=1

and then, do you know where most of your files are? Do you have tons of little files by chance?
Old 03-25-2008, 03:02 PM   #3
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 31
although its a shot in the dark run
find / | wc -l
this will count the the number of files, if its more than you expect then investigate.
files with a zero size still take up space, I have had applications write 700,000+ log files with 0 size that then took up space of the drive without taking up 'space'.
this was many years ago and you would have to have a heck of alot of 0b/small files to lose 25g+
find can be run with options to look for small files.
Old 03-26-2008, 02:11 AM   #4
LQ Newbie
Registered: Mar 2003
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the replies.

[root@zeus01 ~]# du -h / --max-depth=1
22G     /usr
66M     /install
0       /sys
6.2M    /bin
8.0K    /mnt
19M     /sbin
96M     /lib
1.1G    /proc
20M     /lib64
16K     /scripts
8.0K    /opt
2.3M    /queryperf
8.5M    /boot
8.0K    /misc
28K     /tmp
23M     /root
168K    /dev
8.0K    /initrd
59M     /etc
8.0K    /srv
16K     /media
16K     /lost+found
102M    /var
8.0K    /home
8.0K    /selinux
24G     /
Good call on the small files guys, I should've thought of that. However I'm not sure that's the issue. Looks like there's 153,277 total files, of which 109,142 are less than 5k, and 4663 are 0 bytes (the block size of the filesystem is the default of 4k):

[root@zeus01 ~]# find / | wc -l

[root@zeus01 ~]# find / -size 0 | wc -l

[root@zeus01 ~]# find / -size -5k | wc -l
I guess I need to figure out how many blocks are actually in use to see if this might be partly the issue.


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
Missing hard drive space rx7haze Linux - General 13 11-16-2005 07:38 AM
suse and hard drive space missing SuSE05 SUSE / openSUSE 1 04-30-2005 08:51 AM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
How to determine the free Hard Drive space ako Linux - Newbie 2 12-28-2003 10:11 PM
Hard Drive free space gatorbyte Linux - Software 3 05-12-2003 06:28 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:02 PM.

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