Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When i made a new drive it take some space for system file FAT32 take the less space, then NTFS, then ext4 my question how to know the space will be taken for the system before make the drive, if the drive 1giga or 100giga for FAT32, NTFS, ext4.

Edit: when make 10MB drive with FAT32 the size shown 9.9

when make 10MB drive with ext4 the size shown 8.1

the same thing with the bigger size there always some space used and there is no files on the drive, so where this space go, if it for the filesystem how i can calculate the space that will be taken before format the drive

share|improve this question
1  
What you mean is 'filesystem' and it really depends what OS you're using in what scenario, as to which you should use. –  HaydnWVN Apr 10 '12 at 10:23

2 Answers 2

up vote 3 down vote accepted
  1. Improve your English!

  2. Every filesystem has a "table" which contains information (name, size, permissions, type, etc.) about files stored, block size, and, I think some data about physical addresses on the disk, plus some other stuff. It depends on the filesystem how much space is occupied when the partition is empty or if it will grow as more files are added. So when you create a partition there will be some lost space every time.

  3. Just to be clear. Note that HDD manufacturers use the standard notation of 1 GB = 1000 MB. Some operating systems are using the "power of two" standard: 1GiB = 1024GiB (Gibibytes - read more on wikipedia). So don't worry about this kind of space being "taken". E.g. 100GB HDD will have theoretically 93.1323 GiB available.

  4. Now, the block size is an important element of a filesystem. The block is like the atomic structure for a filesystem. A partition is divided into blocks of data. It could be responsible for some small amount of lost space. Let's say you have a HDD of 18KiB of data. You format the partition with a 4KiB block size. You will get a theoretical 4x4=16KiB. 2KiB get lost.

  5. Another important element is fragmentation, which can be external or internal. Fragmentation is another cause of lost space, along with the file system "table". One file looks like a continuous array of blocks on the filesystem. If between two files on a 4K filesystem let's say will remain two blocks, but all the files are more than 8K (2x4), this space will never get occupied. This is external fragmentation. If one file has let's say 10KiB and we want to put it on a 4KiB filesystem, then the filesystem will allocate 12KiB (3 blocks) for it, even though the file has 10KiB. 2 KiB will be left unused for good. This is internal fragmentation (for example, on Windows, when you check the properties of a file it will show the size - how much does it need - and the size on disk - the actual size occupied in the filesystem).

So, I would say don't worry how much space you lose going one filesystem or the other, there are more important aspects of a filesystem than lost space, especially on an empty partition: speed (read, write, indexing, searching), security, large files options, compatibility with certain OS.

I don't know any application that calculates lost space on format.

share|improve this answer
    
for hint no.1 > im working for that, no need to mention, about the rest wonderful just mark ur answer as accepted, thanks for ur help. –  rezx Apr 10 '12 at 12:47

Ext4 as default allocates 5% for superuser use only. This is to make sure that the drive doesn't get filled completely, which would make reallocation of data and other operations fail. This amount can be lowered (often very OK today with the giant drives we have) or removed (not recommended on e.g. /home and system partitions, but on pure storage drives, the negative effects are usually not that large. Perhaps increased fragmentation as the drive fills up to the very rim).

With that out of the way, there is also space reserved for "inodes".

Wikipedia says

A typical allocation heuristic for inodes in a file system is one percent of total size.

which might very well be a good rule of thumb (in practice I'd say it's more of 1.5-2%, but the order of size is correct).

On NTFS the "inode" concept is reflected as the MFT and file ID:s. The MFT grows as more files are added, and are thus not fixed size, and will therefore show small overhead on an empty file system.

And lastly, there is always the confusion between binary prefixes and reported size by drive manufacturers.

See http://askubuntu.com/questions/48488/ext4-partition-size-free-space-discrepancies/48511 for another similar question which touches most pitfalls.

share|improve this answer
    
thanks u were clear thumbs up for the link ^_^ –  rezx Apr 10 '12 at 12:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.