Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15th October 2005, 12:27 AM
dealmaker Offline
Registered User
 
Join Date: Oct 2005
Posts: 98
Question Command Df Shows Wrong Available Space?

Hi,
I use Fedora core 4, and I use command df to show available space and realize that it's wrong. They are all in ext3 format.

df -h shows: (only part of it)
/dev/mapper/VolGroup00-LogVol00
35G 32G 1.2G 97% /
/dev/sda1 230G 217G 1.1G 100% /mnt/e

It doesn't make sense, 35G - 32G not = 1.2G, and 230G - 217G not = 1.1G. What's happening?

Many thanks.

Last edited by dealmaker; 15th October 2005 at 12:30 AM.
Reply With Quote
  #2  
Old 15th October 2005, 03:52 AM
nandowong's Avatar
nandowong Offline
Registered User
 
Join Date: Nov 2004
Posts: 511
the gb is is not 35,000 mb its in powers of two (something like that). so your drive is about 90% of what it is rated.
__________________
I dont pitch linux to my friends, I let windows do that for me :D
I like chicken :D
Reply With Quote
  #3  
Old 15th October 2005, 04:43 AM
buddha Offline
Registered User
 
Join Date: Apr 2005
Location: Texas
Posts: 354
When an ext3 filesystem is created, 5% of the partition's disk space is reserved for superuser use, so

35GB - 5% (1.75) = 33.25 GB (actual disk space available to normal users)

thus 33.25 GB - 32 GB used = 1.25 GB available

(advanced users can change the percentage reserved with the tune2fs command)
Reply With Quote
  #4  
Old 15th October 2005, 05:30 AM
dealmaker Offline
Registered User
 
Join Date: Oct 2005
Posts: 98
Question

Is it for security? It's very inefficient. In my 250gb drive, I have at least 20GB more when the same hard drive is in NTFS if you don't count that 5%. It's based on true data, I backup data from this same drive to another drive, then copied them back. But I realized that it doesn't have enough space in the ext3. So in total, ext3 volume has around 30gb less than ntfs volume. Why? ntfs is better than ext3?

Quote:
Originally Posted by buddha
When an ext3 filesystem is created, 5% of the partition's disk space is reserved for superuser use, so

35GB - 5% (1.75) = 33.25 GB (actual disk space available to normal users)

thus 33.25 GB - 32 GB used = 1.25 GB available

(advanced users can change the percentage reserved with the tune2fs command)
Reply With Quote
  #5  
Old 15th October 2005, 05:43 AM
buddha Offline
Registered User
 
Join Date: Apr 2005
Location: Texas
Posts: 354
I think it's really more a carryover from the old days when UNIX was mostly used as a server. The issue was that you didn't want some rogue application to completely fill up all disk space and leave the machine unable to do anything. Thus, the reserved space allowed the superuser some room to clean up stuff if needed.

These days with Linux used as desktop machines, it's much less necessary to reserve so much space. I've cut down reserved space on some of my 100GB partitions to 1%. Here's an excerpt from

Optimizing Linux filesystems
http://www.newsforge.com/article.pl?.../10/07/1943256

Reserved blocks

Ext2fs and ext3fs reserve a number of blocks for use by the superuser (or some other user you specify). The default value of 5 percent reserved space may be overkill on large partitions or on less critical partitions (such as /home). You can gain a bit more space by using the -m reserved-percentage option to mke2fs. Changing this percentage won't affect actual disk performance, but it may gain you just a bit more available disk space. You can change this option after you create a filesystem by passing the same parameter that mke2fs accepts to the tune2fs program, as in tune2fs -m 1 /dev/hda4 to set the reserved blocks percentage to 1.
Reply With Quote
  #6  
Old 15th October 2005, 06:25 AM
dealmaker Offline
Registered User
 
Join Date: Oct 2005
Posts: 98
Question

Thanks, I used tune2fs and set them to 1%. So one has 300mb as reserved block and the other one has 2.3gb.

But still, I remember that NTFS volume in the same hard drive have much more than 230gb before I formated to ext3. 20gb is a lot to throw away even in a 250gb hard drive. Why is that?

Quote:
Originally Posted by buddha
I think it's really more a carryover from the old days when UNIX was mostly used as a server. The issue was that you didn't want some rogue application to completely fill up all disk space and leave the machine unable to do anything. Thus, the reserved space allowed the superuser some room to clean up stuff if needed.

These days with Linux used as desktop machines, it's much less necessary to reserve so much space. I've cut down reserved space on some of my 100GB partitions to 1%. Here's an excerpt from

Optimizing Linux filesystems
http://www.newsforge.com/article.pl?.../10/07/1943256

Reserved blocks

Ext2fs and ext3fs reserve a number of blocks for use by the superuser (or some other user you specify). The default value of 5 percent reserved space may be overkill on large partitions or on less critical partitions (such as /home). You can gain a bit more space by using the -m reserved-percentage option to mke2fs. Changing this percentage won't affect actual disk performance, but it may gain you just a bit more available disk space. You can change this option after you create a filesystem by passing the same parameter that mke2fs accepts to the tune2fs program, as in tune2fs -m 1 /dev/hda4 to set the reserved blocks percentage to 1.

Last edited by dealmaker; 15th October 2005 at 06:27 AM.
Reply With Quote
Reply

Tags
command, shows, space, wrong

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
NetworkManager shows wrong information wprauchholz Hardware & Laptops 5 22nd December 2006 05:46 PM
Hard drive shows 0 free space until reboot... adampr6 Using Fedora 3 5th October 2004 09:42 PM


Current GMT-time: 14:32 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat