The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > 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 06:09 AM
mandrake/ linux partition jestra UNIX Desktop for Dummies Questions & Answers 2 02-09-2004 02:34 AM
Copying a Linux distro from one partition to the other... Mr_Proper UNIX for Advanced & Expert Users 5 06-18-2003 02:38 PM
Making a UFS Partition w/ Linux Karma UNIX for Dummies Questions & Answers 6 06-16-2003 02:17 PM
Linux Swap Partition primal UNIX for Dummies Questions & Answers 2 01-07-2002 12:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-03-2007
ilan ilan is offline
Registered User
  
 

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

conveyed my question in short; need urgent help.

-ilan
  #2 (permalink)  
Old 08-03-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
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 (permalink)  
Old 08-03-2007
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,984
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 (permalink)  
Old 08-03-2007
ilan ilan is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 101
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 (permalink)  
Old 08-03-2007
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,984
volumemanager like veritas vm have a defrag tool. but the price is high... very high!
  #6 (permalink)  
Old 08-03-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,124
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.
  #7 (permalink)  
Old 08-03-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,235
Quote:
Originally Posted by Perderabo View Post
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.
I agree completely, there is indeed nothing in the concept which prevents it, only in implementation. I also have run many fscks on vxfs with DRL logs enabled and there has never been a destroyed filesystem as a result. likewise UFS with logging enabled.

I have (deliberately) done this on ext3 and reiser(can't remember which one ) and ended up with nothing good afterwards. I certainly would recommend not using them for now for this reason.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0