Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th September 2010, 04:33
ensens ensens is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default real size of the drive. Actual disk space used.

Hello,

I'm confused about disk space on my hard drive. The hard drive in question is simply used for storage and not for anything else (it is not the root filesystem). It is an ext3 drive.

I would like to know if I reclaim any disk space on this drive. It is a 500 GB drive. But, when I run "df -h" it does not show up as a 500GB drive. It shows up as a "459GB drive".

Here's the df command output:
Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             459G  409G   27G  94% /home
It shows available only "27GB". I thought it should show 50GB "Avail".

Is there a way to free up space on this drive? Is there a better tool to view the real details of this disk? Why does it show up as a 459GB disk when it's really a 500GB disk? Is there a way to free up space without deleting "data"?

Thank you for your time and assistance.
Reply With Quote
Sponsored Links
  #2  
Old 27th September 2010, 05:41
matty matty is offline
Member
 
Join Date: Apr 2010
Location: Australia
Posts: 85
Thanks: 2
Thanked 12 Times in 11 Posts
Default

Quote:
Originally Posted by ensens View Post
It shows available only "27GB". I thought it should show 50GB "Avail".
This can be because of block size and file size. If, for example, your disk is formatted with 4k blocks and you have lots of files that are less than 4k in size, you end up with slack space in the file system that can't be written to. If you type "man mke2fs", you'll see that you can tune your blocksize to suit the purpose of the filesystem at the time it is formatted. Don't attempt to change it with live data as you will wipe your filesystem.

Quote:
Why does it show up as a 459GB disk when it's really a 500GB disk?
This is because manufacturers work in gigabytes, and computers work in gibibytes. They are different units of measurement.

http://en.wikipedia.org/wiki/Gibibytes
Reply With Quote
  #3  
Old 27th September 2010, 13:36
ensens ensens is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thank you Matty!
Reply With Quote
  #4  
Old 27th September 2010, 14:41
ensens ensens is offline
Member
 
Join Date: Mar 2007
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

I ran tune2fs to reclaim some disk space on a drive only used for data.
Code:
# tune2fs -m 0 /dev/sdb1
tune2fs 1.41.11 (14-Mar-2010)
Setting reserved blocks percentage to 0% (0 blocks)

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             459G  409G   50G  90% /home
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding non-RAID backup disk to system with RAID 1... BorderAmigos Installation/Configuration 1 20th February 2010 20:50
Can all the installation and configuration be automated (Kickstart) gabby Installation/Configuration 0 30th January 2010 19:47
Apache LoadBalanced, Ldirector. eterzella HOWTO-Related Questions 6 7th February 2009 15:43
ISPConfig Installation error linuxuser1 Installation/Configuration 4 26th February 2008 06:38
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 16:05


All times are GMT +2. The time now is 05:23.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.