LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2002, 02:58 PM   #16
wonderpun
Member
 
Registered: Aug 2002
Location: Geekland, Planet Earth
Distribution: Slackware 9.1
Posts: 323

Rep: Reputation: 30

So you're saying that if I use the FAT32 partition from Linux(move files into and from the partition) it doesn't get fragmented?
 
Old 09-22-2002, 05:43 PM   #17
Faecal
Member
 
Registered: Sep 2002
Location: York, UK
Distribution: Debian Sid
Posts: 215

Rep: Reputation: 30
It will, but surely the only reason that you would be using a fat32 partition is because you also use windows - so the point that you might as well just do it from windows still stands.

Basically no, I don't think that anyone who posted so far knows of a way to defrag fat32 from linux. If you're using fat32 for windows' benefit, defrag it with windows. If you're using fat32 but not windows, then convert to a better filesystem, such as ext2 or reiserfs.
 
Old 09-22-2002, 06:24 PM   #18
Bigun
Member
 
Registered: Aug 2002
Location: Hickville, TN
Distribution: Gentoo > current. Have used: Red Hat 7.3, 9, Gentoo 1.4
Posts: 400

Rep: Reputation: 30
Again....no.....that is not what I am saying. If you DO move files and create them on the FAT32 partition then yes you are fragmenting it. Also, you could be only reading information off of the FAT32 partition, which will NOT fragment it. Even if you were writing and moving files on the FAT32 partition, it STILL wouldn't get near as fragmented as it would when Windows would boot. Case in point, unless you are totally relying on this FAT32 partiton for Linux, y bother defragmenting it from Windows?

Thats all I'm saying.
 
Old 11-28-2002, 06:17 PM   #19
bustersnyvel
LQ Newbie
 
Registered: Nov 2002
Distribution: Debian
Posts: 3

Rep: Reputation: 0
I'm also looking for a way to defrag a fat32 partition from Linux, and for a very good reason: I want to be able to defrag my fat32 partition while I'm working, gaming or programming in my favourite OS: Linux.

If it would be possible to run a fat32-defragger in Linux, it could be run from a cron-job at a low priority, without affecting the performance of my Linux box (the fat32 is on a separate drive). Now that would be nice.
 
Old 11-28-2002, 06:31 PM   #20
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
if you had plenty of diskspace you could
tar your windows into a file in linux, delete everything on the
windows partition, and untar it back ;) ... reniceing all operations
to 20 :}

Cheers,
Tink
and
 
Old 11-29-2002, 01:33 PM   #21
bustersnyvel
LQ Newbie
 
Registered: Nov 2002
Distribution: Debian
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by Tinkster
if you had plenty of diskspace you could tar your windows into a file in linux, delete everything on the windows partition, and untar it back ... reniceing all operations to 20 :}
That's not really an option... nice idea though ;-)

Last edited by bustersnyvel; 11-29-2002 at 01:35 PM.
 
Old 11-29-2002, 02:16 PM   #22
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
NO! Careful ... I've done this before, and some of the files used in Windows bootup don't like being tarred and untarred.

I haven't read closely, but isn't this thread ignoring the fact that the 2nd extended filesystem and FATs are very different in the way they store information on the disk.

A question in a hardware exam for my MSc was something like this:

1a. When I save a file in Windows, why is there a cluster on the disk which is bigger than the actual size of the file?
1b. Why do 2nd extended filesystems not have clusters?

This is a neat question. The answer is of course that Windows stores file information non-contiguously. Ext2 (and of course ext3) store information on disk in the same size as the file, and inode link it to identify it. Windows uses clusters to index files and store them on disk but they're way inefficient.

Try formatting a floppy in windows and see the maximum filesize you can fit. Now do the same on a nix machine. See the difference - a low-level write uses the whole disk 1.44MB. Clever.

Back to defragmenting. If information is not written to disk properly when windows shuts down, provided you have the filesystem mounted in /etc/fstab, fsck.dos will deleted the inodes which can't be connected. Non-contiguity is ignored on FAT partitions as that's how FATs work.

Linux partitions don't need defragmenting, and when there's dirty data, fsck looks after it. As a basic rule, I reckon defragmenting ANY filesystem is a bad idea - it is not well implemented in Windows and is unnecessary in Linux.

Phew, that turned into a bit of an FS rant.

Bert
 
Old 11-29-2002, 03:17 PM   #23
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by Bert
NO! Careful ... I've done this before, and some of the files used in Windows bootup don't like being tarred and untarred.
Never had probs with that :}

Quote:

I haven't read closely, but isn't this thread ignoring the fact that the 2nd extended filesystem and FATs are very different in the way they store information on the disk.
Maybe because it wasn't relevant ;)

Quote:

A question in a hardware exam for my MSc was something like this:

1a. When I save a file in Windows, why is there a cluster on the disk which is bigger than the actual size of the file?
1b. Why do 2nd extended filesystems not have clusters?

This is a neat question. The answer is of course that Windows stores file information non-contiguously. Ext2 (and of course ext3) store information on disk in the same size as the file, and inode link it to identify it. Windows uses clusters to index files and store them on disk but they're way inefficient.
Heh ... that looks like an actual MS answer ... God save us from
MS certified professionals.
ext2(3) uses physical blocks as minimum storage units, their default
size during mkextfs depends on the partitions size. Most commonly
it seems to be 2048 bytes these days. For more information go to ext2 .
FAT, FAT16, FAT32 try to maintain a fixed number of allocation
units and 'bundle' the physical blocks into clusters to maintain this number on any given partition size, which then in reality means that a 10-bytes-batch file can consume 64K :) ... however, this has nothing to do with the fragmentation which occures because FAT tries to allocate new files towards the "outermost edge" of the filesystem, close to the FAT (File-allocation-table which resides on the Cylinder 0 on) and it doesn't care about how it allocates a file... thus, if there is non-contiguous space
available it's going to split the file up, and spread it out over the available blocks.
More Intelligent filesystems try to avoid fragmentation (can't necessarily always avoid it though).

Quote:

Linux partitions don't need defragmenting, and when there's dirty data, fsck looks after it. As a basic rule, I reckon defragmenting ANY filesystem is a bad idea - it is not well implemented in Windows and is unnecessary in Linux.
I've used both MS and Norton tools to defragment FAT
in the bad old days of DOS and never experienced any
troubles in doing so, massive performance gains, though
... I hope that technology didn't step back a lot in the
last 13 years...


Quote:

Phew, that turned into a bit of an FS rant.

Bert
Cheers,
Tink
 
Old 11-29-2002, 04:12 PM   #24
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally posted by Tinkster
Most commonly it seems to be 2048 bytes these days.
Actually most commonly used and usually setup by default is 4096.
 
Old 11-29-2002, 04:42 PM   #25
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by trickykid
Actually most commonly used and usually setup by default is 4096.
Heh ... guess I'm working with too small HD's ;)
Well ... I haven't used ext2 in years ... been with ReiserFS
for ages.

Cheers,
Tink
 
Old 11-29-2002, 04:52 PM   #26
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Quote:
Originally posted by Tinkster
Never had probs with that :}
Maybe because it wasn't relevant
If it wasn't relevant, why elaborate on it?

Quote:

Heh ... that looks like an actual MS answer ... God save us from
MS certified professionals.
Err, sorry - don't do 30-day tech-u-like courses. That means something else altogether.

Quote:

ext2(3) uses physical blocks as minimum storage units, their default
size during mkextfs depends on the partitions size. Most commonly
it seems to be 2048 bytes these days. For more information go to ext2 .
FAT, FAT16, FAT32 try to maintain a fixed number of allocation
units and 'bundle' the physical blocks into clusters to maintain this number on any given partition size, which then in reality means that a 10-bytes-batch file can consume 64K ... however, this has nothing to do with the fragmentation which occures because FAT tries to allocate new files towards the "outermost edge" of the filesystem, close to the FAT (File-allocation-table which resides on the Cylinder 0 on) and it doesn't care about how it allocates a file... thus, if there is non-contiguous space
available it's going to split the file up, and spread it out over the available blocks.
In other words, you agree. But you took the time to dig out the ext2 spec - just to make sure. That's good.

Quote:

I've used both MS and Norton tools to defragment FAT
in the bad old days of DOS and never experienced any
troubles in doing so, massive performance gains, though
... I hope that technology didn't step back a lot in the
last 13 years...
Why do you think Microsoft changed their fs from FAT? Do us a favour and go and find the spec for NTFS ...
 
Old 11-29-2002, 06:38 PM   #27
bustersnyvel
LQ Newbie
 
Registered: Nov 2002
Distribution: Debian
Posts: 3

Rep: Reputation: 0
I agree, all filesystems that I know of are better than FAT32. It's just that I need Win98 for some games, and I haven't figure out how to install & run Win98 from an ext2 partition ;-)

But still, does anyone know a tool that can do basic defragmentation? Or do I have to start programming myself?

Last edited by bustersnyvel; 11-29-2002 at 06:40 PM.
 
Old 11-30-2002, 02:36 AM   #28
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Ext2 and ext3 file systems get fragmented.It's just that nobody likes to mention it.Don't know about reiser and the others.

Last edited by crashmeister; 11-30-2002 at 02:39 AM.
 
Old 12-01-2002, 02:00 PM   #29
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally posted by Bert

In other words, you agree. But you took the time to dig out the ext2 spec - just to make sure. That's good.
No, I don't. I oppose. Neither ext2 nor ext3 nor Reiser (for that matter)
allocate the files' actual size, but rather chunks of whatever size was
appropriate for the size of the HD (or what you told mkfs to use). The
loss, however, is smaller than in FAT (unless you use tiny partitions,
like 64MB).

Quote:

Why do you think Microsoft changed their fs from FAT? Do us a favour and go and find the spec for NTFS ...
I tend to believe that they realized that a filesystem designed
for floppy disks of initially 180K might not be suitable for bigger
media. ;} ... ntfs was also made with less fragmentation and security
in mind, building up on HPFS386. If you want NTFS specs, go ask
your Micky-Soft instructor ;)


Cheers,
Tink

P.S.: Crash, I mentioned that they do fragment :}

Last edited by Tinkster; 12-01-2002 at 02:03 PM.
 
Old 12-03-2002, 09:03 AM   #30
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Quote:
Originally posted by Tinkster
No, I don't. I oppose. Neither ext2 nor ext3 nor Reiser (for that matter)
allocate the files' actual size, but rather chunks of whatever size was
appropriate for the size of the HD (or what you told mkfs to use). The
loss, however, is smaller than in FAT (unless you use tiny partitions,
like 64MB).
Today's random thought for the day:

"A word to the wise: a credentials dicksize war is usually a bad idea on the net."
(David Parsons in c.o.l.development.system, about coding in C.)
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Defragment Dovid Linux - Software 4 04-26-2005 02:46 PM
should i be concerned (defragment?)... marsques Slackware 6 01-13-2005 01:10 AM
defragment linux glock19 Linux - General 11 09-14-2004 07:22 PM
Looking for defragment software. sjia Linux - Software 8 02-22-2004 11:51 PM
Defragment Anmar Linux - Hardware 2 09-10-2003 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration