LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-12-2007, 05:07 PM   #1
Brian5
Member
 
Registered: Dec 2006
Posts: 34

Rep: Reputation: 15
Harddrive Size: False reporting - says free space is smaller than it should be


Hello,

This is basically a generic questions - I've had it happen to me on every machine I've installed linux on to.

Sometimes, when I'm working on a school project (such as a flash presentation or something), I have to store the files on my harddrive so I can later work on them. Ever so often, the file reaches about 100 megs or more.

I've recently deleted all the files off of my /home partition, but when I use:

Quote:
df -h
or
Quote:
discus
(a commandline program for showing a graph in terminal view of the size of a partition)

I get inaccurate results. The free space on my /home was around 5 gigs when I put the files on there, but when I deleted them -- even after rebooting, discus (same with df -h) it showed that I had 3.23 gigs left

Is there a way to fix this? I should have approximately one more gig free...

Thanks!
 
Old 12-12-2007, 05:12 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,391

Rep: Reputation: 583Reputation: 583Reputation: 583Reputation: 583Reputation: 583Reputation: 583
Did you empty the Trash can?

------------------
Steve Stites
 
Old 12-12-2007, 05:21 PM   #3
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
To verify that you /home partition is the size you think it is, could you do:
fdisk -l /dev/...

where "/dev/..." is a device which holds your home partition.
 
Old 12-12-2007, 05:40 PM   #4
Brian5
Member
 
Registered: Dec 2006
Posts: 34

Original Poster
Rep: Reputation: 15
I don't believe I need to empty the trash can... err, well, don't think I do. I use ion3 instead of the gnome desktop manager, and ion3 appears to delete all files once they're deleted instead of sending them to the trash. Also, usually, I delete stuff using the terminal:
rm and rm -R for directories, I always thought that rm completely deleted something without leaving stuff in the trash, if I'm wrong please correct me.

I use ubuntu 7.04 (the 7.10 disc doesn't work for me, and I don't feel it's necessary to upgrade to 7.10 just because it would make my '/' partition be about 80 percent full). I don't think it's a trouble with the distro though, my server is running kubuntu 7.10 and it experiences the same problems.

Quote:
brian@apo:~$ sudo fdisk -l /dev/sda

Disk /dev/sda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 61 489951 83 Linux
/dev/sda2 62 1277 9767520 83 Linux
/dev/sda3 1278 3587 18555075 83 Linux
/dev/sda4 3588 3648 489982+ 82 Linux swap / Solaris
My /home is /dev/sda3. It is the size it should be, around 18.5 gigs, it should have an amount reported that should say it has approximately +- 4 Gbs free. According to discus:
Quote:
brian@apo:~$ discus
Mount Total Used Free Prcnt Graph
/ 9.17 GB 3.98 GB 4.72 GB 43.4% [****------]
/sys 0 KB 0 KB 0 KB 0.0% [----------]
/var/run 121.0 MB 116 KB 120.9 MB 0.1% [----------]
/var/lock 121.0 MB 0 KB 121.0 MB 0.0% [----------]
+oc/bus/usb 121.0 MB 112 KB 120.9 MB 0.1% [----------]
/dev 121.0 MB 112 KB 120.9 MB 0.1% [----------]
/dev/shm 121.0 MB 0 KB 121.0 MB 0.0% [----------]
+c/volatile 121.0 MB 33.0 MB 88.0 MB 27.3% [***-------]
/boot 463.3 MB 36.5 MB 402.9 MB 7.9% [*---------]
/home 17.42 GB 13.30 GB 3.23 GB 76.4% [********--]
+infmt_misc 0 KB 0 KB 0 KB 0.0% [----------]
err... just by looking at that result, it doesn't give the same result as the one provided by fdisk. It seems that my trouble is that the size of my /home is reported as smaller than it actually is, how could I make my computer show that the size is actually 18.5 gigs (like the partition states), instead of 17.42.

Oh, by df -h...
Quote:
brian@apo:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 9.2G 4.0G 4.8G 46% /
varrun 122M 116K 121M 1% /var/run
varlock 122M 0 122M 0% /var/lock
procbususb 122M 112K 121M 1% /proc/bus/usb
udev 122M 112K 121M 1% /dev
devshm 122M 0 122M 0% /dev/shm
lrm 122M 33M 89M 28% /lib/modules/2.6.20-16-generic/volatile
/dev/sda1 464M 37M 403M 9% /boot
/dev/sda3 18G 14G 3.3G 81% /home
It's not just discus that shows an incorrect value. At a fresh install on this computer (about 2 months ago), it both discus and df -h recognized that the size of the partition was about 18.2 GBs (due to formatting). Why did the reported size of the partition shrink, and how can I fix it?

Thanks for the previous responses.

I apologize for the jumbled messages in the quotes, they were in neat columns when I pasted them here.

I found another page on linuxquestions that is part of my problem... http://www.linuxquestions.org/questi...r-bash-176784/

Last edited by Brian5; 12-12-2007 at 06:11 PM.
 
Old 12-12-2007, 06:19 PM   #5
rsashok
Member
 
Registered: Nov 2006
Location: USA, CA
Distribution: RedHat, Debian
Posts: 202

Rep: Reputation: 31
I can't really help-> but I suggest you to experiment. For example create a file of size 1G in your home with command:

dd if=/dev/zero of=big_file bs=1024 count=1048576

Run your commands while file is there, then remove the file and see what you have after. Good luck.
 
Old 12-13-2007, 05:54 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I apologize for the jumbled messages in the quotes, they were in neat columns when I pasted them here.
This hapens with "QUOTE" tags. If you'd like your columns to match up properly, click Go Advanced and use the "CODE" tags (it's a [#] symbol on the formatting bar)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Up2date - package size exceeds free space The_Watcher Linux - General 6 11-18-2007 06:17 AM
GNU/Linux reporting incorrect free space on external drive gnurza Linux - Newbie 4 10-31-2007 07:24 PM
Wrong Size of free disk space ALInux Linux - General 1 04-03-2006 04:22 AM
Free disk space in '/' getting smaller and smaller. simjii SUSE / openSUSE 5 12-16-2005 11:24 AM
df not truly reporting disk free space, why? mark_umr Linux - General 8 12-22-2002 11:20 PM

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

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