{
    "mode": "man",
    "parameter": "e2freefrag",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/e2freefrag/8/json",
    "generated": "2026-06-14T07:36:20Z",
    "synopsis": "e2freefrag [ -c chunkkb ] [ -h ] filesys",
    "sections": {
        "NAME": {
            "content": "e2freefrag - report free space fragmentation information\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "e2freefrag [ -c chunkkb ] [ -h ] filesys\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "e2freefrag  is  used to report free space fragmentation on ext2/3/4 file systems.  filesys is\nthe file system device name (e.g.  /dev/hdc1, /dev/md0).  The e2freefrag  program  will  scan\nthe  block  bitmap  information  to  check how many free blocks are present as contiguous and\naligned free space. The percentage of  contiguous  free  blocks  of  size  and  of  alignment\nchunkkb  is  reported.   It also displays the minimum/maximum/average free chunk size in the\nfile system, along with a histogram of all free chunks.  This  information  can  be  used  to\ngauge the level of free space fragmentation in the file system.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-c",
                    "content": "If  a chunk size is specified, then e2freefrag will print how many free chunks of size\nchunkkb are available in units of kilobytes (Kb).  The chunk size must be a power  of\ntwo and be larger than file system block size.\n",
                    "flag": "-c"
                },
                {
                    "name": "-h",
                    "content": "",
                    "flag": "-h"
                }
            ]
        },
        "EXAMPLE": {
            "content": "# e2freefrag /dev/vgroot/lvhome\nDevice: /dev/vgroot/lvhome\nBlocksize: 4096 bytes\nTotal blocks: 1504085\nFree blocks: 292995 (19.5%)\n\nMin. free extent: 4 KB\nMax. free extent: 24008 KB\nAvg. free extent: 252 KB\n\nHISTOGRAM OF FREE EXTENT SIZES:\nExtent Size Range :   Free extents   Free Blocks  Percent\n4K...    8K- :           704           704     0.2%\n8K...   16K- :           810          1979     0.7%\n16K...   32K- :           843          4467     1.5%\n32K...   64K- :           579          6263     2.1%\n64K...  128K- :           493         11067     3.8%\n128K...  256K- :           394         18097     6.2%\n256K...  512K- :           281         25477     8.7%\n512K... 1024K- :           253         44914    15.3%\n1M...    2M- :           143         51897    17.7%\n2M...    4M- :            73         50683    17.3%\n4M...    8M- :            37         52417    17.9%\n8M...   16M- :             7         19028     6.5%\n16M...   32M- :             1          6002     2.0%\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This  version  of  e2freefrag  was  written by Rupesh Thakare, and modified by Andreas Dilger\n<adilger@sun.com>, and Kalpak Shah.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "debugfs(8), dumpe2fs(8), e2fsck(8)\n\n\n\nE2fsprogs version 1.46.5                    December 2021                              E2FREEFRAG(8)",
            "subsections": []
        }
    },
    "summary": "e2freefrag - report free space fragmentation information",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "If a chunk size is specified, then e2freefrag will print how many free chunks of size chunkkb are available in units of kilobytes (Kb). The chunk size must be a power of two and be larger than file system block size."
        },
        {
            "flag": "-h",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [
        "# e2freefrag /dev/vgroot/lvhome",
        "Device: /dev/vgroot/lvhome",
        "Blocksize: 4096 bytes",
        "Total blocks: 1504085",
        "Free blocks: 292995 (19.5%)",
        "Min. free extent: 4 KB",
        "Max. free extent: 24008 KB",
        "Avg. free extent: 252 KB",
        "HISTOGRAM OF FREE EXTENT SIZES:",
        "Extent Size Range :   Free extents   Free Blocks  Percent",
        "4K...    8K- :           704           704     0.2%",
        "8K...   16K- :           810          1979     0.7%",
        "16K...   32K- :           843          4467     1.5%",
        "32K...   64K- :           579          6263     2.1%",
        "64K...  128K- :           493         11067     3.8%",
        "128K...  256K- :           394         18097     6.2%",
        "256K...  512K- :           281         25477     8.7%",
        "512K... 1024K- :           253         44914    15.3%",
        "1M...    2M- :           143         51897    17.7%",
        "2M...    4M- :            73         50683    17.3%",
        "4M...    8M- :            37         52417    17.9%",
        "8M...   16M- :             7         19028     6.5%",
        "16M...   32M- :             1          6002     2.0%"
    ],
    "see_also": [
        {
            "name": "debugfs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/debugfs/8/json"
        },
        {
            "name": "dumpe2fs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/dumpe2fs/8/json"
        },
        {
            "name": "e2fsck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/e2fsck/8/json"
        }
    ]
}