LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   ext3 formatted drive capacity smaller than ntfs (http://www.linuxquestions.org/questions/linux-general-1/ext3-formatted-drive-capacity-smaller-than-ntfs-208750/)

gsupp 07-23-2004 11:17 AM

ext3 formatted drive capacity smaller than ntfs
 
I searched and searched for an hour and couldn't find an answer to my question. I apologize if it has already been answered.

I have an IBM 180GB hard disk that had a formatted capacity of 172GB under NTFS. When I formatted the drive as ext3 under linux, df -h shows a size of 170GB, 161GB avail and 33MB used. A similar occurance happened with a 250GB disk, when formatted as ext3, df -h showed the size was 230GB, used was a few MB and avail was 10GB lower than the size (about 220GB.) My question, is this expected for ext3? I'm loosing 10GB of storage space on each drive which doesn't seem right. At this rate, the data that was on the NTFS partition won't fit on the same drive under an ext3 partition. Also, why the discrepancy between the size and avail listing from df? Thanks in advance for your replies.

linmix 07-23-2004 11:58 AM

ABout the difference between partition size and available space right after formatting: ext3 is a journalised file system. It keeps track of your files and some space is needed (and dreserved) for this journal. The space you lose isn't too much and the advantages of a journalised system outweigh the inconvenience of loss of space.

gsupp 07-23-2004 11:59 AM

I understand the journal takes up space, but 10GB???

michaelk 07-23-2004 12:53 PM

Yes, this is normal. By default 5% of the disk is reserved for root which isn't apparent with the df command. You can use the tune2fs utility to reduce the space. In theory it is supposed to reduce fragementation and if a user fills up a partition root is still able to log in for maintenance.

gsupp 07-23-2004 01:04 PM

Thanks for the reply michaelk. Should I keep some space reserved to help with fragmentation? I looked up tune2fs and I believe what you're referring to is the sparse_super setting which is the number of backup superblocks. Is that correct? Do the following commands seem sane to set 1GB for backup superblocks? Is 1GB even necessary?

tune2fs -O sparse_super=1048576 /dev/hdc1
e2fsck /dev/hdc1

Sorry for all the questions, I'm migrating to linux for our file servers and linux filesystems are new to me.

michaelk 07-23-2004 01:28 PM

It is the -m option.I would keep some reserved space. Be sure to unmount the disk before changing.

tune2fs -m 1 /dev/hdc1

gsupp 07-23-2004 02:09 PM

Worked like a charm...thanks again.

sh1ft 07-23-2004 02:11 PM

NTFS is a journalized file system too. =/

gsupp 07-23-2004 02:51 PM

...well... df is showing:

/dev/hdc1 170G 170G 0 100%

all space being used, but I didn't copy any more files to it. Shouldn't this free up space on the disk? Or is it just making df properly report disk usage?

michaelk 07-23-2004 09:34 PM

Well I do not understand why it is showing 100% full.

linmix 07-24-2004 02:49 AM

what flags are you using? Can't access my linux box right now, but is there a flag to indicate free space instead of used space...?

gsupp 07-24-2004 04:15 PM

linmix, I didn't see a flag for free space instead of used space. Here is the complete output of df -h:

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 17G 1.1G 15G 7% /
/dev/sda1 99M 14M 80M 15% /boot
none 62M 0 62M 0% /dev/shm
/dev/hdc1 170G 170G 0 100% /movies
/dev/hda1 230G 21G 207G 9% /data

There's only about 1.7GB of data that was previously on the drive under NTFS that won't fit now under ext3. Perhaps the 1.7GB difference has to do with the 1% reserved-blocks-percentage that's still set? Now that I calculate it out, it's exactly 1%. So I guess I answered my own question... :confused: lol Thanks for everyone's reply.

linmix 07-25-2004 02:47 PM

Never mind. I wasn't at alinux box so I couldn't check the man page and there has to be some reason...


All times are GMT -5. The time now is 09:30 AM.