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 |
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.
|
|
09-09-2006, 04:36 AM
|
#1
|
Member
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106
Rep:
|
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....
|
|
|
09-09-2006, 08:13 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
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.
|
|
|
09-10-2006, 11:10 PM
|
#3
|
Member
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106
Original Poster
Rep:
|
any windows code that has been tested to work fine under wine
|
|
|
09-11-2006, 12:38 AM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
|
no clue but for a few bucks i would sugest Diskeeper as the best windows 3rd party app for defrags.
|
|
|
09-11-2006, 12:38 AM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983
|
|
|
|
09-11-2006, 03:04 AM
|
#6
|
Member
Registered: Jun 2004
Location: Bangkok, Thailand
Distribution: Fedora 25 86_64
Posts: 357
Rep:
|
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
|
|
|
02-17-2012, 02:20 PM
|
#7
|
LQ Newbie
Registered: Apr 2006
Location: Chagrin Falls, OH
Distribution: Ubuntu / Debian
Posts: 17
Rep:
|
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.
|
|
|
02-17-2012, 04:11 PM
|
#8
|
Moderator
Registered: Mar 2008
Posts: 22,178
|
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.
|
|
|
08-14-2012, 04:37 AM
|
#9
|
Senior Member
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable/testing, amd64
Posts: 1,067
Rep:
|
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.
|
|
|
08-14-2012, 09:02 AM
|
#10
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
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.
|
|
|
All times are GMT -5. The time now is 11:04 PM.
|
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
|
|