Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, sure, they are smaller, because they are 120 giga bytes, so that is somewhere around 113GB, and that is what df command shows, but what puzzles me is that why is there used space 33MB and free space 107 of 113GB?
Is there 6GB of FS data? Reiser/xfs or even NTFS for that matter use only 100-200MB of space for the file system, so I am confused about where did 6GB go.
I have looked at several ext3 filesystems, and there always seems to be a lost 5%.
I have also looked at a NetBSD filesystem (not sure about the name, but it's the standard BSD-like filesystem used by NetBSD), and, here too, there was a lost 5%.
On solaris, it's always 10%.
After reading df, mkfs, mkfs.ext3,mkfs.ext2, newfs and several other manpages, my guess is that df does not include reserved blocks in the Avail size.
I say this because filesystems with 5% reserved blocks have a 5% 'lost space', and filesystems with 10% reserved blocks (Solaris default) have a 10% 'lost space'
Read the reserved block count with tune2fs to be sure.
EDIT: If you need the extra space, use tune2fs to lower the reserved block count. Only do this on drives that only provide extra storage (ex. a hard drive to store pictures, or other user data only, like /home). DON'T do this on a partition that provides storage for essential system applications (like /tmp, /usr, /, /etc)
Last edited by stefan_nicolau; 07-09-2005 at 08:56 AM.
It is not exactly lost. By default when you format an ext2/ext3 filesystem 5% is reserved for root use. In your case 5% is 6GB. This is space is supposed to reduce fragementation and allow root to login in case the filesystem becomes full.
And as stefan_nicolau suggests you can use tune2fs to reduce the amount of reserved space.
Yes, but what about performance? I use a Maxtor diamond max9, which is one of the industrie's fastest performing IDE ATA-133 drives, and operating at 2 MB/s is crazy, I will start tearing my hair out if I see this speed again (My SD-Card works faster on FAT32).
I see with man tunefs, that I can tweak the size of blocks, to improve performance and, there is some time optimization, is there something else, that can help me speed-up the rate?
hmm, strange, you are right, hdparm shows better results, actually here are the results:
Maxtor 7200RPM Reiser:
/dev/sda1:
Timing buffered disk reads: 124 MB in 3.06 seconds = 40.54 MB/sec
Maxtor 7200 ext3:
/dev/sda1:
Timing buffered disk reads: 78 MB in 3.03 seconds = 25.77 MB/sec
darkstar:/home/ntadmin # hdparm -t /dev/hda1
Seagate Laptop HDD 4200RPM with Reiser:
/dev/hda1:
Timing buffered disk reads: 82 MB in 3.06 seconds = 26.76 MB/sec
So ext3 is still significantly slower, then reiser (not 15x though, wich kind of makes me happy), well at least I got my 6 GB back and increased the speed to 25MB/s after reformatting with -m 0 option.
However I will now create some dumb files on the 120GB drive to test it at 70% used and 90% used space to see how it reacts to it.
Thanks, you made me feel better, I thought Red Hat's ext3 was really outdated and slow.
Linux darkstar 2.6.11.4-21.7-default #1 Thu Jun 2 14:23:14 UTC 2005 i686 i686 i386 GNU/Linux
hmm, but how can it monitor disk speed if I used the same drive for ext3, then reformatted it with reiser and got different results. Then I tested on another drive with NTFS and reiser partitions, and NTFS and reiser sections of /dev/hda got different speeds. Besides: why would you need to enter the partition ID if it scanned the drive speed? it would just need /dev/hda, not /dev/hda1, so it does meter FS speed too.
A) You have the latest version of ext3 (check which journal mode you are using if performance seems low)
B) I have no clue what is going on with hdparm
C) http://forums.gentoo.org/viewtopic-t-322898.html
D) Repeat the above tests on your computer if you don't trust the author (or want to confirm his results).
The Journal size is around 2GB (auto-selected) and the block size is 4k, which is the best for performance.
The point is, that I don't need a universal system, because versatility makes us compromise performance, it's kind of like it is with planes for example: you can't make a good bomber and a figher at the same time.
I am planning to use the HDD as a ftp server folder, so I need fast concurrent transfer rates, and that's it.
And I have found the cause of low transfers, but I don't have a solution to it yet:
if it auto-mounts on hotplug, the speed is < 2MB/s, but if I remount it again myself, the speeds are ok.
Do you have any idea what causes this?
When the ext3 file sytem is created. It creates a lot of item called superblocks and inodes. These are the areas which are used to store things like location, size, permission and filenames on your file system. It creates them all at the start and they are what are taking up all that space on your hard drive. The journal and reserved spaces added to this gives you a reasonable size chunk of you drive. Without these you have no file system.
In other words it takes a percentage of the drive space to create a file system. This applies to all file systems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.