How do I defragmemt a partition on Linux?


 
Thread Tools Search this Thread
Operating Systems Linux How do I defragmemt a partition on Linux?
# 1  
Old 08-03-2007
How do I defragmemt a partition on Linux?

conveyed my question in short; need urgent help.

-ilan
# 2  
Old 08-03-2007
The filesystems in Linux don't need defragmentaion, like Windows. If your filesystem is corrupted though, you need to recover it (or at least try to); check the man pages for "fsck" - "check and repair a Linux file system"
# 3  
Old 08-03-2007
if your filesystem becomes too slow due to fragmentation (there is fragmentation under linux!) you can simply copy your files (if possible) to an other disk or filesystem. delete the old filesystem and copy the data back. afaik there is no defrag tool for linux.....
# 4  
Old 08-03-2007
Thanks for the replies DukeNuke2 & sysgate!
It is not that my system has gone slow...but, defragmentation on a volume is kind of customer scenario I want to test with the product I work!!

-ilan
# 5  
Old 08-03-2007
volumemanager like veritas vm have a defrag tool. but the price is high... very high!
# 6  
Old 08-03-2007
Quote:
Originally Posted by sysgate
The filesystems in Linux don't need defragmentaion, like Windows. If your filesystem is corrupted though, you need to recover it (or at least try to); check the man pages for "fsck" - "check and repair a Linux file system"
...hold on a second here. This very much depends on what filesystem you are using. fsck on some of the journalled filesystems may do noting short of destroying them for example I would not suggest this on ext3 or reiser filesystems.

Last edited by reborg; 08-03-2007 at 01:11 PM..
# 7  
Old 08-03-2007
A full fsck should not destroy a filesystem. I heard that fsck on ext3 is nasty. Reiser too? Seesh... those filesystems are broken and I would not use them until they work correctly. Veritas filesystems are journalled and extent-based. I have run a full fsck on many Veritas filesystems. There is nothing about journalled or extent-based filesystems that makes them inherently non-repairable. However, fsck does not defrag them, it only repairs damage.

The Veritas defrag tool is for the Veritas filesystem, not the Veritas volume manager. The Veritas filesystem and the Veritas Volume Manager are two different things and it is possible to use one without using the other. Using a volume manager in a clueless manner could indeed cause a form of fragmentation, but the defrag tool won't help that.

The Windows/DOS FAT filesystem family can fragment and then benefit from defraging. Linux supports FAT and a lot of us use FAT filesystems on multiboot systems to share files between Windows and Linux. I have always booted back to Windows to defrag a FAT filesystem. I don't know if Linux has a FAT defrag tool. I don't know of one offhand, but I have never really looked.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Resize Linux partition

Hello., Could any one please share the informaiton about this or please point me the reference : Assume, we have the following partition after linux machine is setup, it will mention like this : bash$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda2 10G... (3 Replies)
Discussion started by: alnhk
3 Replies

2. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies

3. Red Hat

Linux partition with LVM

Hi, I need a suggesstion i have 2 disk if i installed OS / root partition by making Lvm in one disk and data in other disk also with the lvm, means 2 different lvms. Is making LVM partition for OS disk will the performacne will be good? Can i make 2 different lvm one is for OS and other for... (1 Reply)
Discussion started by: Rahulne25
1 Replies

4. Red Hat

Limitations on the partition of linux

Hi, I need a documentation about limitations on the linux partition. On how many primary and extended I could create. And also on different type of storage, how many big capacity I can create. Thanks. (3 Replies)
Discussion started by: itik
3 Replies

5. Linux

problem to format linux partition

hi friends one week ago, i have installed fedoa 9 on my home pc. i already have windows xp on that machine. unfortunately my windows xp has corrupted. again i want to install windows xp but it is not installing. will i format my linux partition or some other option is there. please help me... (0 Replies)
Discussion started by: praneshmishra08
0 Replies

6. Linux

how to create new partition in Linux

i want to create on directory called /data under "/ " . but when i m using mkdir /data it is telling permission denied. could any one tell me how to do it ? (1 Reply)
Discussion started by: useless79
1 Replies

7. UNIX Desktop Questions & Answers

mandrake/ linux partition

okay... I want to learn linux, i have some books, but im one of those types who would rather get my hands dirty then read a textbook. dont get me wrong, i will spend some time reading. I really want to install mandrake first, but because i have no experience with Linux or unix, i think im... (2 Replies)
Discussion started by: jestra
2 Replies

8. UNIX for Advanced & Expert Users

Copying a Linux distro from one partition to the other...

Hola. Here is how my partition table looks: Device Boot Start End Blocks Id System /dev/hde1 1 1689 13566861 7 HPFS/NTFS /dev/hde2 * 1690 2783 8787555 83 Linux /dev/hde3 2784 2813 240975 82 Linux swap /dev/hde4 ... (5 Replies)
Discussion started by: Mr_Proper
5 Replies

9. UNIX for Dummies Questions & Answers

Making a UFS Partition w/ Linux

Well, the subject speaks for itself; how does one go about making a UFS partition in a Linux environment? I don't recall seeing it as an option in my version of fdisk (I'll have to check again when I go home :( ) (6 Replies)
Discussion started by: Karma
6 Replies

10. UNIX for Dummies Questions & Answers

Linux Swap Partition

How big do I set the swap partition when i'm setting up my hard drive to install RedHat. (Using Partition Magic) thanks! primal (2 Replies)
Discussion started by: primal
2 Replies
Login or Register to Ask a Question