LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-03-2010, 09:21 AM   #1
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Free space reported


I have a partition which is just about full, and added a new HDD for more space. I decided to try partitionmanager for KDE when I noticed the reported free space was wrong.

partitionmanager reports free space on /dev/sda3 as 61.61GiB.
http://www.replica9000.bizland.com/l...rtitionman.png
I though maybe the program was wrong, being it's the first time I've used it.

Dolphin reports the free space as 1.0Gib
http://www.replica9000.bizland.com/l...dolphin001.png
This seems to be accurate. I tried to copy a 1.4GiB file and it failed.

So I decided to see what gparted reports, which I've used plenty of times. gparted reports 47.14GiB free.
http://www.replica9000.bizland.com/l...ts/gparted.png

Since Dolphin seems to be reporting the correct free space left, where are these partition managers getting their number from? I even tried parted without the frontends.
Code:
parted -ms /dev/sda unit GiB print free
BYT;
/dev/sda:932GiB:scsi:512:512:msdos:ATA WDC WD10EACS-00D;
1:0.00GiB:7.45GiB:7.45GiB:ext3::boot;
2:7.45GiB:9.32GiB:1.86GiB:linux-swap(v1)::;
3:9.32GiB:932GiB:922GiB:ext3::;
1:932GiB:932GiB:0.00GiB:free;
All 4 report space in GiB, yet the numbers seem to be very different. Why is this?
 
Old 12-03-2010, 09:57 AM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Just a guess, but by default ext3 reserves 5% of the disk space for system use only. For the disk that the OS is actually on this is done to prevent the system from being unable to boot properly when it runs out of space. For non OS disks it is just wasted. You can shut off this reserve but only do it for non OS disks(storage area).
 
Old 12-04-2010, 12:15 AM   #3
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Ok that makes sense. I can see why Dolphin would report less than the partition managers. But still partitionmanager and gparted still report to completely different numbers.

So the command "tune2fs -m 0 /dev/sda3" should be safe to use, letting me reclaim 47.14 to 67.67 of GiBs back.
 
Old 12-04-2010, 12:30 AM   #4
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
One may take into account the file system size (indexes, superblock backup, journal, structure, etc) while the other don't. Calculating RAM, CPU and HDD usage is tricky, there is no real number, it depend how to calculate it. It is why top, htop, ksysguard and gnome-system-monitor can agree with the CPU usage number. It is bettr for HDD, but still not perfect. Even the total disk size is usually not the same in cfdisk, gparted and fdisk
 
Old 12-05-2010, 07:43 PM   #5
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,126

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
I found this article explaining more of what's going on here:
http://en.wikipedia.org/wiki/Binary_...umer_confusion


Quote:
Originally Posted by lazlow View Post
Just a guess, but by default ext3 reserves 5% of the disk space for system use only.
Thank you for pointing this out. I didn't realize EXT3 does this. If you had not pointed this out, I could be missing out on over 93GiB of space on my 2TB HDD!
 
  


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
Help removing free space to create Raw free space nightmare55 Linux - Newbie 11 10-01-2009 03:07 AM
Incorrect and conflicting free disk space reported in Lenny raovq Debian 5 05-06-2009 12:14 PM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Disk Free space being incorrectly reported NiallC Linux - General 2 10-02-2004 05:06 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 03: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