Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On Windows, there is Disk Defragmentor that runs every so often to make files contiguous again.

I explain this to users in lay-men terms, but at the same time, I would like to mention yet another +1 about our company, but really have no understanding of the Solaris process to even know if that would work, so how is it done in Solaris?

If it is different depending on filesystem, I it would be nice to know about ZFS, UFS, and whatever the most popular Linux filesystem is.

share|improve this question
    
Related: How can I de-fragment a drive using Ubuntu? –  Gilles Jun 7 '11 at 22:23
add comment

1 Answer 1

up vote 10 down vote accepted

The most popular Linux files systems are ext2/3/4, xfs, reiserfs and the upcoming btrfs. None of these files systems need to be routinely defragmented. Other care can be taken, but that isn't part of regular maintenance. Constant fragmentation is a problem peculiar to windows file systems.

From my knowledge of zfs it doesn't either, but my knowledge of ufs is limited.

share|improve this answer
    
UFS fragmentation information can be found here –  Iain Jun 7 '11 at 20:38
    
@Caleb strictly speaking EXT2/3/4 can fragment but only if the volume is nearly full. –  Andrew Lambert Jun 7 '11 at 21:25
2  
Strictly speaking, all the usual unix filesystems can become fragmented. It's just that they don't quickly tend to become fragmented the way FAT32 and NTFS, especially if your disk isn't almost full. –  Gilles Jun 7 '11 at 22:25
    
@Amazed and @Gilles are of course correct, the technically possibility exists. I changed the tone of my answer a little bit to reflect this. Any system that has been run at full disk capacity for any length of time likely suffers some. Usually doing normal housekeeping on the files will allow the filesystem to do it's job and houseclean internally. I believe a few ext tools even exist to force this, but as a general system admin procedure they are not needed. –  Caleb Jun 7 '11 at 23:06
1  
I wouldn't limit fragmentation-as-a-problem to Windows. Other filesystems that allocate in extents or runs, like ODS-2 or SGI's old EFS, needed regular defragging. UFS, ext2/3/4, allocate files by block, so non-contiguous files don't mess up performance as obviously. –  Bruce Ediger Jun 7 '11 at 23:50
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.