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 12-13-2001, 07:01 PM   #1
tome
LQ Newbie
 
Registered: Dec 2001
Location: PA
Distribution: debian
Posts: 7

Rep: Reputation: 0
Large drive- too much space lost by large block size?


Hi all,

I have an 7200RPM 80GB drive that I will be using to store mainly MP3 files (to give you an approx average file size). I am currently using a single ext3 partition. The normal format (mke2fs) of the fs uses 4k block size. A 667 MB (700,119,428 bytes) directory tree (with 143 files and 23 sub-dirs) takes up 810 MB (849,346,560 bytes) on the disk! A friend has an NTFS formatted drive (50GB ) with the same directory which takes little more than the original file size (maybe smaller default block size, unsure).

This leads me to a few questions that I hope you can help me with:

1. Can I simply use a smaller block size for the file system? I never imagined such a high bookeeping cost on single ~700 MB directory. Would it be better to take the hit of a smaller block size-> larger filesystem table but overall would it save me space?
It seems on a full drive (this will be filled) I would lose nearly 10GB of data space if I kept with this 4k block size. I doubt the fs table could be made that large by smaller blocks? Also what about the speed loss of smaller blocks?

2. Is it better to use 2 or more partitions? I don't want them for any data reasons (backup, corruption, I'm fine with the 80GB as one partition, but if it will help space loss then i can deal with > 1)

3. Is ext3 journal causing all this mess? I don't think it impacts but just in case, figured I would ask.

Any other questions and answers that you would like to supply, are there other reasons I could be losing so much space?

Please feel free to reply to all or only some of the questions, and please lend your insights.

Thank you very much!

Tom
 
Old 12-14-2001, 12:13 AM   #2
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
As you said your friend has NTFS and it saves alot of space and meant to do so since it's meant for serving lots of different files and apps. That's the same thing with fat16>fat32 When fat16 was converted to fat32 you end up with more space than before with better performance due to the 32bit block allocation it uses. So in answer yes, Linux can do the same and instead of useing 4096k per node, you can use 2048 or 1024. 2048 is a great middle ground and you won't sacrifice enough in performance compared to the space you'll save. Especially since you'll have tons of small (by comparison) files, it's actually recommended by many. Having one partition is fine too. Shouldn't make much difference if it's just storage.
 
Old 12-14-2001, 02:11 AM   #3
tome
LQ Newbie
 
Registered: Dec 2001
Location: PA
Distribution: debian
Posts: 7

Original Poster
Rep: Reputation: 0
One quick follow up. But first, thank you very much for the above info.

Follow up: I've been using mke2fs with -m 0 to reserve no space for the superuser on the partition. Is this safe to do on a data drive? are there any downsides?

Thanks for your help!

Tom
 
Old 12-14-2001, 12:02 PM   #4
Stephanie
LQ Addict
 
Registered: May 2001
Location: Arizona
Distribution: 9.2 Mandy 1.4 Gentoo 5.1 FreeBSD WinXP
Posts: 1,166

Rep: Reputation: 45
Are you using 2 drives, with one being nothing but data storage, and the other being your Linux setup?

If you are, then you dont need a /root partition on the data drive. If you are instead using only one disk, then it is HIGHLY recommended that you create at least a /root partiion for the superuser.

The main reason being is that Linux will mount the superuser partition, or /root first on boot-up. If it can boot that, the system can still be usuable.

If however you use only one partition and dont separate the /root, then if you get a file system problem, Linux may be unable to mount /root and then not be able to continue the boot-up.

Another reason not to use only one partition is the risk of reformatting or deleting your personal files when you do an upgrade or re-install. Most distros allow you not to reformat or delete the /home partition, so no personal settings or preferences are ever changed.

Very nice feature to have you are someone who tries something, messes the system up, then has to re-install everything
 
Old 12-14-2001, 12:15 PM   #5
tome
LQ Newbie
 
Registered: Dec 2001
Location: PA
Distribution: debian
Posts: 7

Original Poster
Rep: Reputation: 0
I have a data drive and a non-data drive, and am doing the formatting etc. for the data drive only (as per these posts).

Terminology question: When mke2fs reserves space (about 5% normally, changed with the -m option) on a partition, I think you are referring to that as superuser partition? I've never called that the root partition, I've always made my /root manually (and of course as a separate partition), and in fact never knew that "Extra" space was used until i manually ran mke2fs.

So, knowing that, I am wondering if I would gain anything from the reserved space on the data drive, could the system boot off of it given an failure of my initial drive? Would the creation of the system files on that reserved space be automatic, or would I have to manually partition and create files there?

Thanks,

Tom
 
Old 12-14-2001, 02:32 PM   #6
Stephanie
LQ Addict
 
Registered: May 2001
Location: Arizona
Distribution: 9.2 Mandy 1.4 Gentoo 5.1 FreeBSD WinXP
Posts: 1,166

Rep: Reputation: 45
OK, that is what I was confused about. A data drive to me is a drive that is holding nothing but user files and does not have Linux installed on it. It is accessed via /mnt command.

I am not sure about how to answer your terminology question, as I do not format or partition my drives that way. I use the graphical environment for that, jsut for better visuallization as to what I am doing. Maybe someone else can help you there.

As far as making your data drive bootable... the only way I know to do that is to install Linux on that drive as well. You would use space that way though.

As an example of what I did, I have two drives installed. One drive has Linux installed into various partitions, and my /home is on there as well. My second drive is simply formatted as ReiserFS, with the mount point as /mnt/music. There is nothing else on there. Of course, if the Linux system drive goes down, I cannot boot off of the /mnt/music because Linux is not actually installed on it.

So to answer your question about whether you would gain space.. yes.

I hope this helps you out.

Stephanie
 
  


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
Large size of fonts in KDE brokenflea Slackware 2 01-15-2008 02:39 PM
No space left on device - even after rm large fiiles. LancerNZ Linux - General 9 05-09-2006 05:55 AM
Very large pdf file size gmgartner Linux - Software 5 04-28-2005 12:23 PM
KDE 3.2 menu size too large jlinkels Linux - Software 2 08-08-2004 04:30 PM
Large disk size Shaddell Linux - General 1 01-07-2003 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration