Defragmentation of disk under LinuxSome posts on the web say that XFS does not need to be defragmented, but it is wrong. XFS, such as delayed write technology, can actually reduce fragmentation, but if the server is in use for several years, and the file operation is more frequent, it will be fragmented and should be sorted. Note: The XFS-related commands in Debian are in the Xfsprogs package, and the XFS_FSR command is in the Xfsdump package. So to use XFS_FSR to defragment, remember to install Xfsdump package. In other Linux distributions, packages that contain XFS-related commands should also be called similar names and Google yourself.
Xfsdump-administrative Utilities for the XFS filesystem
XFSLIBS-DEV-XFS filesystem-specific static Libraries and headers
Xfsprogs-utilities for managing the XFS filesystem
First, view the fragments
1, view the/DEV/SDC1 of the debris situation:
# xfs_db-c Frag-r/DEV/SDC1
Actual 93133, ideal 8251, fragmentation factor 91.14%
This should clean up the pieces:)
2, view the/dev/sdb1 of the debris situation:
# xfs_db-c Frag-r/DEV/SDB1
Actual 905607, ideal 900507, fragmentation factor 0.56%
This doesn't have to be defragmented.
Third, he obtained the benefit from the XFS_FSR:) (Excerpt from http://www.linux.com/feature/141404)
wow! Hi, That's l teach me to use a non-default tech without researching it.
Over the years, I MythTV box had gotten inexplicably slow with lots to disk access for many operations like starting Back to a recorded video. With the advice, I measured 98.6% fragmentation. A Few sample files I checked that were 1-6GB captured MPEG-2 videos were the on over stored 30,000
After 2 nights of the de-fragmenting, I ' m down to 17% fragmented and startup time of playing a-video-noticeably with Less hard drive activity.
Iv. Reference
http://www.linux.com/feature/141404
Http://www.nekochan.net/wiki/index.php/XFS_defragmentation
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/a_man/ Cat1/fsr_xfs.z
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.