Linux - GeneralThis 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.
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.
Just remember that it is a good idea to have a least 10% of the filesystem you want defragmented available for the entire process to be successful. And don't forget, UNMOUNT THE AFFECTED FILESYSTEM BEFORE YOU RUN DEFRAGMENT!
That link links to download.tuxfamily.org/optimization/OptimizationKit/v0.1/tmp/ for ok_defrag, which returns 404.
Does anyone has a new link?
I think I desperately need to defrag my file system:
Code:
$ ls -Alh hg/programs/internet/VideLibri/videlibri
-rwxr-xr-x 1 benito benito 26M Dec 24 14:17 hg/programs/internet/VideLibri/videlibri
$ filefrag hg/programs/internet/VideLibri/videlibri
hg/programs/internet/VideLibri/videlibri: 747 extents found, perfection would be 1 extent
$ ls -AlrSh ~
[...]
-rw-r--r-- 1 benito benito 13M Jan 15 2011 project1.exe
-rw-r--r-- 1 benito benito 13M May 31 2010 Stein.pdf
-rw-r--r-- 1 benito benito 13M Mar 25 2010 xxx.flv
-rw-r--r-- 1 benito benito 23M Mar 2 2010 vogeldatabase.tar.bz2
-rw-r--r-- 1 benito benito 3.3G Jul 26 10:23 9200.16384.WIN8_RTM.120725-1247_X64FRE_ENTERPRISE_EVAL_EN-US-HRM_CENA_X64FREE_EN-US_DV5.ISO?lcid=1033
$ filefrag 9200.16384.WIN8_RTM.120725-1247_X64FRE_ENTERPRISE_EVAL_EN-US-HRM_CENA_X64FREE_EN-US_DV5.ISO\?lcid\=1033 vogeldatabase.tar.bz2 xxx.flv Stein.pdf project1.exe
9200.16384.WIN8_RTM.120725-1247_X64FRE_ENTERPRISE_EVAL_EN-US-HRM_CENA_X64FREE_EN-US_DV5.ISO?lcid=1033: 7344 extents found, perfection would be 1 extent
vogeldatabase.tar.bz2: 160 extents found, perfection would be 1 extent
xxx.flv: 230 extents found, perfection would be 1 extent
Stein.pdf: 7 extents found, perfection would be 1 extent
project1.exe: 8 extents found, perfection would be 1 extent
$ ls -AlrSh /tmp
...
-rw-r--r-- 1 firefox firefox 844K Aug 3 00:53 hC29318.fmt
-rw-r--r-- 1 firefox firefox 844K Aug 17 21:21 hZb7071.fmt
-rw-r--r-- 1 firefox firefox 845K Aug 17 21:21 hBC7071.fmt
-rw-r--r-- 1 benito benito 847K Oct 11 22:36 crap
-rw------- 1 firefox firefox 1.5M Dec 24 23:36 clipboardcache
-rw-r--r-- 1 benito benito 1.7M Dec 24 15:05 videlibri-1.301.src.tar.gz
$ sudo filefrag hBC7071.fmt hZb7071.fmt hC29318.fmt crap clipboardcache videlibri-1.301.src.tar.gz
hBC7071.fmt: 14 extents found, perfection would be 1 extent
hZb7071.fmt: 25 extents found, perfection would be 1 extent
hC29318.fmt: 5 extents found, perfection would be 1 extent
crap: 3 extents found, perfection would be 1 extent
clipboardcache: 10 extents found, perfection would be 1 extent
videlibri-1.301.src.tar.gz: 15 extents found, perfection would be 1 extent
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 192251960 182113376 372680 100% /
I'm not sure exactly which filesystem you are using. But if it is ext4, then you might use e4defrag, which is part of the e2fsprogs package.
Quote:
e4defrag - online defragmenter for ext4 filesystem
e4defrag reduces fragmentation of extent based file. The file targeted by e4defrag is created on ext4 filesystem made with "-O extent" option (see mke2fs(8)). The targeted file gets more contiguous blocks and improves the file access speed.
Happy with ur solution... then tick "yes" and mark as Solved!
... that is a issue with Microsoft and there operating system
And even then, only for FATx filesystems, and then only if and when you really care anymore. (As mass-storage devices become semiconductor based, you won't care anymore...) Microsoft's later filesystems like NTFS have better space-allocation mechanisms, and disk drives and controllers are considerably smarter and faster.
On a drive that had been intensively used for 8 years, fsck revealed 14% non-contiguous files. A check on the web shows people saying that you needed to defrag a Windows drive if that figure gets to 35%. Is your data ominous? Frankly, I can't make much sense of the program output!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.