LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-23-2004, 11:17 AM   #1
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Rep: Reputation: 0
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.
 
Old 07-23-2004, 11:58 AM   #2
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
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.
 
Old 07-23-2004, 11:59 AM   #3
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
I understand the journal takes up space, but 10GB???
 
Old 07-23-2004, 12:53 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.
 
Old 07-23-2004, 01:04 PM   #5
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 07-23-2004, 01:28 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

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

tune2fs -m 1 /dev/hdc1
 
Old 07-23-2004, 02:09 PM   #7
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Worked like a charm...thanks again.

Last edited by gsupp; 07-23-2004 at 02:51 PM.
 
Old 07-23-2004, 02:11 PM   #8
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 31
NTFS is a journalized file system too. =/
 
Old 07-23-2004, 02:51 PM   #9
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
...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?
 
Old 07-23-2004, 09:34 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,858

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Well I do not understand why it is showing 100% full.
 
Old 07-24-2004, 02:49 AM   #11
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
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...?
 
Old 07-24-2004, 04:15 PM   #12
gsupp
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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... lol Thanks for everyone's reply.
 
Old 07-25-2004, 02:47 PM   #13
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files from NTFS drive to a EXT3 drive?? webshark Slackware 10 05-28-2006 03:02 PM
recover fat partition formatted with ext3 by error mermoz Linux - Newbie 3 05-31-2005 06:55 AM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 02:56 PM
Hard Drive capacity twantrd Linux - General 2 10-12-2004 02:04 PM
How to mount windows drives (NTFS formatted) to linux? djadhav Linux - Software 5 03-28-2004 11:23 AM


All times are GMT -5. The time now is 03:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration