# EXT3 gives me less total capacity



## DiGiTY (Oct 16, 2006)

My 1 TB RAID drive was FAT32 and had 931 GB total capacity. I re-formatted it as EXT3 and I only have 870 GB total capacity. why the difference? Is this normal?


----------



## tech.jk (Aug 5, 2007)

ummmmmmmmmmm... did you partition the drive?


----------



## lotuseclat79 (Sep 12, 2003)

Hi DiGiTY,

As root, issue the command: fdisk -l
and post it here (it basicly will list the contents of the partition tables on all of your disks) - it will tell you a lot both before and after you reformat. In this case, to make a comparison, you might need to reformat as fat32, issue fdisk -l, and then reformat as ext3, issue fdisk -l in order make the comparison between the two formats - but, I doubt you will want to do that.

-- Tom


----------



## DotHQ (May 6, 2008)

For comparison sake I did the fdisk -l on a Red Hat system that I have a 4.1 TB power vault attached. The 4.1 TB turned into 3.8 TB (ext3) of usable space once formatted.


----------



## lotuseclat79 (Sep 12, 2003)

Hi DotHQ,

Thanks for the data. Every file system is encumbered with inodes and metadata that control how it functions in the OS environment. That is the difference between having a total capacity (4.1TB), and a useable capcity (3.8TB) - without it, one would not be able to find their files!

-- Tom


----------



## DiGiTY (Oct 16, 2006)

i didn't re-format the drive in question (sdb1) back to FAT32, but I do have another drive that is the clone (sda1) of the drive in question when it was FAT32:


```
[email protected]:~$ sudo fdisk -l

Disk /dev/sda: 1000.1 GB, 1000144371712 bytes
255 heads, 63 sectors/track, 121593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x52aa52aa

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      121593   976695741    c  W95 FAT32 (LBA)

Disk /dev/sdb: 1000.2 GB, 1000213577728 bytes
255 heads, 63 sectors/track, 121602 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004ef61

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121602   976768033+  83  Linux
[email protected]:~$
```
does this help?


----------



## DiGiTY (Oct 16, 2006)

okay, this is weird... i just copied some files over (~400 GB) from the FAT32 drive to the EXT3 drive and NOW the total capacity has jumped from 870 GB to 917 GB for the EXT3!!

what's going on here?


----------



## lotuseclat79 (Sep 12, 2003)

Total capacity is determined when you format the drive, so your capacity has not changed as you can see by the output of the fdisk -l command.

Hard disks are formatted at a low-level with 512 byte sectors. File systems are formatted at a higher level to map to the low level sectors on the hard drive where the data really resides as mapped by the file system inodes. Take the number of cylinders as formatted and multiply by the figure 8225280 bytes, e.g.
8225280 bytes * 121593
or
8225280 bytes * 121602

The way you compute 1TB is not 1,000,000,000,000 bytes, but with KB block sizes that are 1024 bytes * 1024 bytes for 1MB * 1024 bytes for 1GB * 1024 bytes for 1 TB or a total of 1099511627776 bytes total in 1TB.

-- Tom


----------



## DiGiTY (Oct 16, 2006)

so basically usable capacity of a EXT3 formatted 1 TB drive is normally 870 GB and 931 GB on a FAT32 formatted 1 TB drive... why the discrepancy (sorry, if it feels like I'm repeating myself, I don't think my original question was answered)?

did I format it wrong (i used GParted)?


----------



## lotuseclat79 (Sep 12, 2003)

Hi DiGiTY,

No, the total capacity of each disk is the same. There are more cylinders in the Linux formatted disk than the FAT32 formatted disk according to your fdisk -l output. (See the blocks columns).

There is a difference in how each file system formats the disk - i.e. usable capacity vs. total capacity (which is the same). The metadata and inode structures for each file system is the difference - i.e. different file systems have different designs where some are more reliable than others - and, I do not believe that the FAT32 file system is journaled, whereas, the ext3 file system includes a journal.

-- Tom


----------



## DiGiTY (Oct 16, 2006)

okay so journaled is taking up extra GBs?

I formatted the drive from the command line (mkfs.ext3 -m 1 -j -L mindgrapes) and this time I get 924 GB of usable capacity. i guess that's okay, I guess I can live with 7 less GB of space

...though space is an issue right now... could I use different switches/options to get even more usable space (I just can't get over the fact that FAT32 is using all of the available 931 GB and something more advanced like EXT3 can't)?


----------



## lotuseclat79 (Sep 12, 2003)

A journaled file system such as ext3 guarantees a greater amount of data reliability than a file system without one (fat32).

Everything is a tradeoff - do you want greater reliability with regard to the data kept in your file system, or if reliability does not matter - go back to using fat32.

Neither file system can guarantee the hard drive won't fail, which is a good reason for backing up your hard drives.

-- Tom


----------



## kaska (Sep 21, 2008)

Hi, I also got a new 1tb hd in an enclosure. And format it to ext3. but the thing is i get even less space than diggity. this is what i get when i type in df:
/dev/sdb1 917G 37G 834G What I want to know is why is the total usable space only 871g and not 917. What happened to the rest of the 46g?


----------



## lotuseclat79 (Sep 12, 2003)

Issue the command as a regular user from Linux:
$ sudo fdisk -l

What does that tell you about the partitions on the hard drive?

-- Tom


----------



## kaska (Sep 21, 2008)

tom,

I get this: 
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux


----------



## DiGiTY (Oct 16, 2006)

@kaska: EXT3's journaling and reserved space for the super user is gobbling up those extra usable GBs. if you didn't specify to disable journaling and lower the reserved space when formatting then they will be enabled by default (5% is the default reserved space, that's most of ya 46 GB). I don't know how to disable journaling (not sure if you want to do that anyway) but you need to use tune2fs to re-configure the super user reserved space:


```
tune2fs -m 1 /dev/sda1
```
this'll lower the reserve space to 1% (the lowest setting possible I believe). substitute /dev/sda1 with ya own partition of course. you may have to reboot ya machine for it to go into affect. the majority of ya 46 GB will come back usable then

i simply re-formatted the drive with the following:


```
extfs.ext3 -m 1 -j /dev/sda1
```
i enabled journaling obviously, but the reserved space is lowered to 1%. again substitute /dev/sda1 with ya own partition.

this drive is a data/storage for me and that's why I don't feel i need the reserved space and i lowered it


----------



## kaska (Sep 21, 2008)

Digity:
Hi. I figured it was the reserved space for superuser. During the initial format, it said it was creating some space for super user. Anyways, this 1tb drive is for general media storage so i don't think i would need the reserved space. I am running Debian Freelink for Buffalo Nas drive w/ 500gb. That 500gb has all the system files, this 1tb is attached to it via usb, and is for general media storage. If i do lower the reserve space, would i need to reformat again? &#65321;already have a few gigs on it and would be problematic if i have to move those gigs of files somewhere else.

Edit: Digity, Tried your command, says that the reserve space has been changed, yet when i reboot the changes are still not taking effect. I will try shutdown this time. *crosses fingers*


----------

