LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2006, 04:36 AM   #1
kniwor
Member
 
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106

Rep: Reputation: 15
Defragment FAT32 from Linux


k, so i got dual boot on some machines, and the main partition for keeping DATA is FAT32, which is badly fragmented almost always, since machines are usually in Linux and hardly are booted into windows, it is hard to run a defragmentation software from there, i need a linux solution that can do the job, and it would be good if it runs automatically....
 
Old 09-09-2006, 08:13 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Disk defragmentation has always been ignored in the Unix world. I don't believe that there is a disk defragmenter that runs in Linux. The only thing that you can do, as far as I know, is to back up the partition, reformat the partition, and then restore from backup.
 
Old 09-10-2006, 11:10 PM   #3
kniwor
Member
 
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106

Original Poster
Rep: Reputation: 15
any windows code that has been tested to work fine under wine
 
Old 09-11-2006, 12:38 AM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
no clue but for a few bucks i would sugest Diskeeper as the best windows 3rd party app for defrags.
 
Old 09-11-2006, 12:38 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
http://www.diskeeper.com/defrag.asp

enjoy
 
Old 09-11-2006, 03:04 AM   #6
Dummy-in-Linux
Member
 
Registered: Jun 2004
Location: Bangkok, Thailand
Distribution: Fedora 19 86_64
Posts: 355

Rep: Reputation: 32
Linux file systems resist disc fragmentation. A typical Linux disc partition would typically be between 2% and 5% fragmented and rarely exceed 20% fragmentation.

For this reason the Ex2defrag program is rarely used, especially as the partition has to be unmounted, and therefore becomes unusable during processing.

Many systems administrators would regard as unacceptable having to put a partition out of service for the duration of a defragmentation.

There is also an argument that defragmenting files actually degrades performance and disc space availability by undoing the benefits of the sparse file storage that is employed by Linux
 
Old 02-17-2012, 02:20 PM   #7
gnuzilla
LQ Newbie
 
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17

Rep: Reputation: Disabled
Angry Fat32 Defrag

I know this is years late, but a search brought me to this post.

@Dummy-in-Linux: Did you actually read the original question? ".., the main partition for keeping DATA is FAT32, ..."
It's almost like people just see the words 'Linux' and 'Defrag', and immediately go on the "Linux filesystems don't need to defrag rant".
Seriously if you search this question, expect that unrelated rant somewhere on every post.

If anyone has a an alternative solution, I would really appreciate any help.

NOTE: 'alternative solution' means not one of these crappy workarounds.
1. Boot any other OS, looking for something native GNU/Linux.
2. Manually. or automatically, recreating the filesystem.
3. O&O Defrag Linux BETA, Will not defrag FAT16/FAT32 or NTFS

Last edited by gnuzilla; 02-17-2012 at 02:22 PM.
 
Old 02-17-2012, 04:11 PM   #8
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,388

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
At one time the official way to defrag windows was to backup it and restore it. That still hold true if you have no other way. You tar it off and tar it back.
 
Old 08-14-2012, 04:37 AM   #9
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable, amd64
Posts: 805

Rep: Reputation: 32
yeah, right we all know backup+restore would 'defragment' it. but thats not a real solution. because good defragmenter will place often used files near disk edge, leave small gaps, etc. and it should be faster. also doesn't need so much extra space.

problem is, even Windows software doesn't have good FAT32 defragment as they all rely on builtin API which cannot move FAT32 directories

There is "Partition Logic" bootable .iso that supposedly can defragment FAT32, dunno if its reliable.
 
Old 08-14-2012, 09:02 AM   #10
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
You can try this filesystem-agnostic defragging script. It appears to simply reorder the files in largest-to-smallest order.

http://ck.kolivas.org/apps/defrag/

I've never tried it myself, so I can't vouch for it. From a quick glance at the code though there are a couple of lines that tell me it's currently not safe to use if any filenames contain embedded newlines, at the least.
 
  


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
Disk defragment on linux??? mihalisla Linux - Newbie 12 07-26-2006 02:52 PM
defragment for Linux alaios Linux - General 1 08-16-2005 04:15 AM
defragment linux glock19 Linux - General 11 09-14-2004 07:22 PM
No Defragment for Linux weronpc Linux - Newbie 6 02-11-2004 01:21 PM
Defragment in Linux ras123 Linux - General 5 02-05-2004 05:10 PM


All times are GMT -5. The time now is 10:29 PM.

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