LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Lost space on HD (https://www.linuxquestions.org/questions/linux-general-1/lost-space-on-hd-469698/)

Mitsuhashi 08-01-2006 07:50 AM

Lost space on HD
 
Hi!
I've created (with gparted) a new ext2 partition of 59GB on my hard disk.
I've succesfully mounted on my filesystem but I've noticed a strange thing.
With df I see that there are only 56GB avaible of the total 59GB of the partition even if I didn'n copy any file on it, it's empty but 3GB are used... how is it possibile?

(P.S.: Excuse me for my bad english)

michaelk 08-01-2006 07:54 AM

When an ext2/3 filesystem is created by default 5% is reserved for root. This is allows root access the partition in case the filesystem becomes full and reduce fragmentation. You can use tune2fs to change the amount of reserved space.

fogcat 08-01-2006 07:59 AM

There could be several answers that I can think of, all of them harmless:

1) The reported size is based on "regular" numbers, not a binary amount. Binary is broken down in amounts of 1024 not 1000.

2) Your partion info does not show MBR (you didn't say if you had a multi boot system).

3) If you do have *dows on your system, it does it's own thingy with your partions.

I hope that this isn't confusing, it is really quite simple, you most likely have no problem whatsoever.

Good luck

marozsas 08-01-2006 08:01 AM

Because your system reserves 5% for root. Even when the filesystem is full there is some space to root fix the things. This extra space can be used only by root.

You can check it by yourself, with the "tune2fs -l /dev/your-disk-partition-here". Take a look in "Block count" (the total size in blocks), "Reserved block count" (the reserved space in blocks) and "Block size" (the size in bytes of 1 block).

Mitsuhashi 08-01-2006 08:01 AM

Thanks very much... Now that I know why that space is seen as used I'll leave all how it is.

Thanks marozsas for your explanation

syg00 08-01-2006 08:03 AM

Just blame the journal - doesn't come for free.
And the "reserved" michaelk also mentioned of course.

benjithegreat98 08-01-2006 09:57 AM

Quote:

Originally Posted by syg00
Just blame the journal - doesn't come for free.

I thought that ext2 was not a journaled FS. That is the primary difference in ext2 and ext3.

syg00 08-01-2006 04:32 PM

Exactly right - d'oh.
I specifically read that as ext3, hence my comment.
Sorry, was late at night here - ignore the bit about the journal.


All times are GMT -5. The time now is 11:26 PM.