<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fragmentation on nagg.eu</title><link>https://nagg.eu/tags/fragmentation/</link><description>Recent content in Fragmentation on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 20 Jan 2016 18:18:18 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/fragmentation/index.xml" rel="self" type="application/rss+xml"/><item><title>Defragment XFS file system</title><link>https://nagg.eu/defragment-xfs-file-system/</link><pubDate>Wed, 20 Jan 2016 18:18:18 +0000</pubDate><guid>https://nagg.eu/defragment-xfs-file-system/</guid><description>&lt;p&gt;XFS just like EXT4 (&lt;!-- raw HTML omitted --&gt;I wrote a post about it last year&lt;!-- raw HTML omitted --&gt;) supports online defragmentation, to manage those volumes on CentOS and Fedora &lt;code&gt;xfsprogs&lt;/code&gt; package is needed.&lt;br&gt;
Fragmentation level of XFS volumes can be checked with the command:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@CentOS ~]$ xfs_db -c frag -r /dev/sdb1
actual 4491, ideal 4006, fragmentation factor 10.80%
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To perform online defragmentation of XFS volumes run the following command:&lt;/p&gt;</description></item><item><title>Defragment EXT4 file system</title><link>https://nagg.eu/defragment-ext4-file-system/</link><pubDate>Fri, 10 Apr 2015 16:55:03 +0000</pubDate><guid>https://nagg.eu/defragment-ext4-file-system/</guid><description>&lt;p&gt;EXT4 is usually pretty good at keeping files fragmentation at minimum, but, sometimes, especially if dealing with really huge files, some fragmentation may actually occur.&lt;br&gt;
Luckily EXT4 supports online defragmentation, command fsck displays, among other things, fragmentation percentage:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@fedora ~]$ fsck.ext4 -fvn /dev/sda1
e2fsck 1.42.12 (29-Aug-2014)
Warning! /dev/sda1 is mounted.
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

 429 inodes used (1.31%, out of 32768)
 **5 non-contiguous files (1.2%)**
 1 non-contiguous directory (0.2%)
 # of inodes with ind/dind/tind blocks: 0/0/0
 Extent depth histogram: 420
 45161 blocks used (34.46%, out of 131072)
 0 bad blocks
 1 large file

 402 regular files
 17 directories
 0 character device files
 0 block device files
 0 fifos
 0 links
 1 symbolic link (1 fast symbolic link)
 0 sockets
------------
 420 files
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The command e4defrag, which is contained in e2fsprogs, can be used to perform online defragmentation of EXT4 volumes.&lt;/p&gt;</description></item></channel></rss>