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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
07-23-2004, 12:17 PM
|
#1
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Rep:
|
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.
|
|
|
07-23-2004, 12:58 PM
|
#2
|
Senior Member
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Rep:
|
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.
|
|
|
07-23-2004, 12:59 PM
|
#3
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Original Poster
Rep:
|
I understand the journal takes up space, but 10GB???
|
|
|
07-23-2004, 01:53 PM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,340
|
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.
|
|
|
07-23-2004, 02:04 PM
|
#5
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
07-23-2004, 02:28 PM
|
#6
|
Moderator
Registered: Aug 2002
Posts: 26,340
|
It is the -m option.I would keep some reserved space. Be sure to unmount the disk before changing.
tune2fs -m 1 /dev/hdc1
|
|
|
07-23-2004, 03:09 PM
|
#7
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Original Poster
Rep:
|
Worked like a charm...thanks again.
Last edited by gsupp; 07-23-2004 at 03:51 PM.
|
|
|
07-23-2004, 03:11 PM
|
#8
|
Member
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391
Rep:
|
NTFS is a journalized file system too. =/
|
|
|
07-23-2004, 03:51 PM
|
#9
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Original Poster
Rep:
|
...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?
|
|
|
07-23-2004, 10:34 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,340
|
Well I do not understand why it is showing 100% full.
|
|
|
07-24-2004, 03:49 AM
|
#11
|
Senior Member
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Rep:
|
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...?
|
|
|
07-24-2004, 05:15 PM
|
#12
|
LQ Newbie
Registered: Jul 2004
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
07-25-2004, 03:47 PM
|
#13
|
Senior Member
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Rep:
|
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:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|