Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
EXT filesystems (and most Linux file systems in general) defragment themselves over time. That said, if you use the storage in such a way as to promote fragmentation, moving to EXT4 with delayed allocation seems to help a LOT. On a busy system it reduces fragmentation during new file creation dramaticly, and fragmentation has less impact on performance than it does with EXT3.
There are newer file systems that should have even better properties, but they do not seem quite ready. Yet.
I suspect that your storage performance issues may not be due to fragmentation, but it would take a significant effort to test enough to be sure.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
The easiest way I know of defragmenting ext3, not that it needs it anyway, is to copy the entire system to another drive and then copy it back. The writing process automatically puts the file fragments in their corerct position. I have a system running Debian Sid here and its fragment status is 0.2% I wouldn't think that is an issue.
Your best solution, in my opinion, would be to combine the suggestions in the two prior posts (#4 and #5), by copying the ext3 file system into an ext4 one, and using the new ext4 one to replace the old one. Note, however, that you cannot copy system files (/dev, /proc, etc.) and expect things to keep working. (rsynccan be used for system files. In fact, consider changing your file system to ext4 and then just restoring the files from your back-ups.) IIRC, you can convert an ext3 file system to an ext4 on "on the fly," but - if I were to attempt that - I'd make sure that I had at least two working back-ups. . .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.