Today, I got a question about how to check the fragmentation of ext4 filesystems, as most common for the Data Center edition or Server edition setups.
That article is the next step of a previous story about the improvement of latency for volumes.
Of course, some users can ask why we need to do defragmentation on ext4 as it’s not fragmented. As an answer, I would recommend checking out the presentation from LinuxCon 2010 with the name Outline of Ext4 File System & Ext4 Online Defragmentation Foresight and watch the small video with fragmentation (https://www.youtube.com/watch?v=w0TzYtuh8D0)
So let’s start to use one small command line utility e4defrag.
Online man page you can find here: http://manpages.ubuntu.com/manpages/focal/man8/e4defrag.8.html
$ sudo e4defrag -c /location
$ sudo e4defrag /location
$ man e4defrag
This is result on out test env:
Reference:
Hope it helps for your DC installations on ext4.
Cheers,
Gonchik Tsymzhitov
Gonchik Tsymzhitov
Solution architect | DevOps
:)
Cyprus, Limassol
175 accepted answers
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
4 comments