LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Defrag in Linux (https://www.linuxquestions.org/questions/linux-general-1/defrag-in-linux-790783/)

Gins 02-22-2010 09:17 AM

Defrag in Linux
 
In Windows the command defrag makes the hard drive somewhat effective-

How do I do the defrag in Linux?

JimBrewster 02-22-2010 09:26 AM

The short (and I'm sure overly simplistic) answer is that Linux filesystems don't become fragmented the way they do in Windows, so defrag is not needed.

fusion1275 02-22-2010 09:26 AM

Hi, please explain to us what you are trying to achieve?

Linux has all sorts of filesystem checks and disk integrity checks. Whats going with your installation?

Rgds

Gins 02-22-2010 09:33 AM

Thanks for the replies,

I thought there is a defrag command in Linux which does the same as the Microsoft.

There may be another way of checking file disarray in Linux.

TB0ne 02-22-2010 09:47 AM

Quote:

Originally Posted by Gins (Post 3872661)
Thanks for the replies,

I thought there is a defrag command in Linux which does the same as the Microsoft.

There may be another way of checking file disarray in Linux.

You don't suffer from "file disarray" in Linux, at least not the the way you're thinking of it. There are no 'defrag' tools, because there's never a NEED to 'defrag' your disk.

repo 02-22-2010 09:54 AM

Take a look at
http://geekblog.oneandoneis2.org/ind..._defragmenting

i92guboj 02-23-2010 03:22 AM

I/O schedulers render defragers useless, mostly. Most file systems do not have an issue with fragmentation, not a noticeable one anyway (as long as you don't use reiser 3.x). You can always backup, format and restore if you are really interested.

There have been a number of attempts to create such tools in the past, but all the projects I knew of have been discontinued, no real interest in them besides academic interest. There are also plans for such a tool for ext4, and also for an on-line defragmenter, maybe also for btrfs. However this might very well be also a project that will die before it's born as the rest of them in the past.

giammy 02-23-2010 08:34 AM

Quote:

Originally Posted by Gins (Post 3872643)
In Windows the command defrag makes the hard drive somewhat effective-

How do I do the defrag in Linux?

Hi,

perhaps the most simular tool is fsck, but it do no defrag: it checks
filesystem concintency. Anyway it is automattically strated from time
to time: no need for you to start
bye
giammy

Gins 02-23-2010 09:03 AM

Thanks everybody.
Our friend giammy touched on the command 'fsck'. It is different; nothing to do with de-fragmentation.
However, repo had given us an interesting link.

I use or rather people use ext3 file system. I don't know about 'reiser' file system. This must be something new.

TB0ne 02-23-2010 10:57 AM

Quote:

Originally Posted by Gins (Post 3873835)
Thanks everybody.
Our friend giammy touched on the command 'fsck'. It is different; nothing to do with de-fragmentation.
However, repo had given us an interesting link.

I use or rather people use ext3 file system. I don't know about 'reiser' file system. This must be something new.

No, not new at all:

http://en.wikipedia.org/wiki/ReiserFS

i92guboj 02-23-2010 12:31 PM

Reiser has its age, it's no longer a young critter. It has its own set of lovers and haters around it just like every other fs around. There are quite a lot of fs's that are compatible with linux to a given extent. Ext2/3 is considered the standard linux fs though. The wikipedia is full of articles about the many linux fs's. You can start researching around there if you feel curious, they are not hard to find.


All times are GMT -5. The time now is 01:55 PM.