The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to create new partition in Linux useless79 Linux 1 07-25-2007 02:09 AM
mandrake/ linux partition jestra UNIX Desktop for Dummies Questions & Answers 2 02-08-2004 11:34 PM
Copying a Linux distro from one partition to the other... Mr_Proper UNIX for Advanced & Expert Users 5 06-18-2003 10:38 AM
Making a UFS Partition w/ Linux Karma UNIX for Dummies Questions & Answers 6 06-16-2003 10:17 AM
Linux Swap Partition primal UNIX for Dummies Questions & Answers 2 01-07-2002 09:37 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-02-2007
Registered User
 

Join Date: Jul 2007
Posts: 76
How do I defragmemt a partition on Linux?

conveyed my question in short; need urgent help.

-ilan
Reply With Quote
Forum Sponsor
  #2  
Old 08-03-2007
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,197
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"
Reply With Quote
  #3  
Old 08-03-2007
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,468
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.....
Reply With Quote
  #4  
Old 08-03-2007
Registered User
 

Join Date: Jul 2007
Posts: 76
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
Reply With Quote
  #5  
Old 08-03-2007
DukeNuke2's Avatar
Soulman
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 1,468
volumemanager like veritas vm have a defrag tool. but the price is high... very high!
Reply With Quote
  #6  
Old 08-03-2007
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,590
Quote:
Originally Posted by sysgate View Post
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 09:11 AM.
Reply With Quote
  #7  
Old 08-03-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0