Linux command
e2freefrag 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
e2freefrag [/dev/sdXN]
Example
e2freefrag -c [chunk_size_in_kb] [/dev/sdXN]
说明
e2freefrag prints free space fragmentation information for ext2/ext3/ext4 filesystems. It shows how many free blocks are available as contiguous and aligned free space in histogram format. The tool analyzes the filesystem's free space distribution, reporting statistics about chunk sizes and their frequency. This information helps assess filesystem health and determine if defragmentation might improve performance. Useful for identifying fragmentation patterns that could impact sequential I/O performance, particularly on systems with large files or database workloads.
参数
- -c _chunk_kb_
- Report the number of free chunks of the given size (in KB). Must be a power of two and larger than the filesystem block size.
- -h
- Display usage information.
FAQ
What is the e2freefrag command used for?
e2freefrag prints free space fragmentation information for ext2/ext3/ext4 filesystems. It shows how many free blocks are available as contiguous and aligned free space in histogram format. The tool analyzes the filesystem's free space distribution, reporting statistics about chunk sizes and their frequency. This information helps assess filesystem health and determine if defragmentation might improve performance. Useful for identifying fragmentation patterns that could impact sequential I/O performance, particularly on systems with large files or database workloads.
How do I run a basic e2freefrag example?
Run `e2freefrag [/dev/sdXN]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c _chunk_kb_ do in e2freefrag?
Report the number of free chunks of the given size (in KB). Must be a power of two and larger than the filesystem block size.