LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-30-2009, 05:11 PM   #1
IceTerminal
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Question Find used drive space


I've done a search for my problem but could not find anything, so please forgive me if I've missed it.

My problem is that my drive is reporting that its 97% full. Doing some initial checks, I can't find any reason why it would say this as my drive is 250GB in size but only about 83GB is being used.
I'm using Ubuntu 9.04 server 32bit. The drive is a standard Maxtor SATA drive.
Quote:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 229G 210G 7.6G 97% /
As you can see, its saying its almost full. But doing a check on what directories are using what, it only shows that 83% is being used.
A further break down shows:
Quote:
# du -xhc --max-depth=1
6.1M ./bin
186M ./boot
700K ./root
4.0K ./downloads
0 ./sys
88K ./tmp
4.0K ./opt
4.0K ./selinux
4.0K ./srv
12K ./media
0 ./proc
16K ./lost+found
76G ./files
556M ./home
2.9G ./usr
2.6G ./var
1.5G ./lib
16K ./audio
20K ./mnt
23M ./etc
4.0K ./initrd
0 ./dev
7.3M ./sbin
83G .
83G total
Doing a manual check of du -h shows basically the same.
Directories within the / partition
Quote:
/bin = 6.1M
/boot = 186M
/cdrom -> media/cdrom = 0
/dev = 312K
/etc = 23M
/files = 76G
/home = 556M
/initrd = 4.0K
/lib = 1.5G
lost+found = 0
/media = 12K
/mnt = 20K
/opt = 4.0K
/proc = 0 ???
/root = 700K
/sbin = 7.3M
/selinux = 4.0K
/srv = 4.0K
/sys = 0
/tmp = 88K
/usr = 2.9G
/var = 2.6G
So I"m looking for help on this one. I"m not running anything weird, just a normal server running web, email, etc. Can someone point me in the right direction that can help me find and clear this? Thank you very much in advance.
 
Old 06-30-2009, 05:28 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
http://www.blindhog.net/linux-find-large-directories/
 
Old 06-30-2009, 06:17 PM   #3
IceTerminal
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez View Post
Yes, I've done those commands before. They always come up and show the drive space being used is 83GB, not the 209GB that the df command shows.

Any other ideas on how to sleuth out the usage?
 
Old 06-30-2009, 06:32 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Have you recently moved any mount points? Once I moved /home to a new partition and forgot to delete all the files before mounting the new /home directory. Did that make any sense?

I'll try to explain better, just in case. I installed linux with a single / partition that then started running out of space. /home had 15GB of files in it. Then I created a mount point /mnt/newhome on a new disk (like /dev/sdb1) and copied all the files over to newhome. Then I changed fstab and remounted /dev/sdb1 as /home without deleting the files on the old /home directory. So /dev/sda1 was still "using" the 15GB, even though it wasn't shown. So I had to unmount the new home directory, change fstab back, delete all the files from /home, then remount /dev/sdb1 as /home. Then the 15GB were free again.
 
Old 06-30-2009, 09:25 PM   #5
IceTerminal
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pljvaldez View Post
Have you recently moved any mount points? Once I moved /home to a new partition and forgot to delete all the files before mounting the new /home directory. Did that make any sense?

I'll try to explain better, just in case. I installed linux with a single / partition that then started running out of space. /home had 15GB of files in it. Then I created a mount point /mnt/newhome on a new disk (like /dev/sdb1) and copied all the files over to newhome. Then I changed fstab and remounted /dev/sdb1 as /home without deleting the files on the old /home directory. So /dev/sda1 was still "using" the 15GB, even though it wasn't shown. So I had to unmount the new home directory, change fstab back, delete all the files from /home, then remount /dev/sdb1 as /home. Then the 15GB were free again.
I understand, but I'm pretty sure that i didn't mount / remount / unmount anything. In fact, everything was fine until I tried to copy a file over to it and it ran out of space. In checking, I found the drive reporting 97% full, but could only account for 83GB of the 250GB total space.
 
Old 06-30-2009, 10:22 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
There must be a simple answer to this......but: More often than I can count, I have solved such things by brute force--in the limit, by reinstalling the system.

You certainly could copy everything to another drive, and then see what's left......AND--I assume you have ruled out hidden files or directories.
 
Old 07-01-2009, 01:58 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
How about sparse files: see --appparent-size here http://linux.die.net/man/1/du
Another thing to check (although prob not the answer) is inode usage (-i) http://linux.die.net/man/1/df
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive space - 100% in use but there is space? imagineaxion Ubuntu 2 06-12-2008 10:44 AM
best way to find out what is taking up the bulk of your hard drive space? dr_zayus69 Linux - Software 2 06-30-2005 07:51 AM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Not enough space for root directory on a drive with 50g free space??? auoq Linux - Newbie 1 10-13-2004 12:44 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:10 PM.

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