{"id":3617,"date":"2022-12-20T17:09:10","date_gmt":"2022-12-20T20:09:10","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/e4defrag-man8\/"},"modified":"2022-12-20T17:09:10","modified_gmt":"2022-12-20T20:09:10","slug":"e4defrag-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/e4defrag-man8\/","title":{"rendered":"E4DEFRAG (man8)"},"content":{"rendered":"<h1 align=\"center\">E4DEFRAG<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">e4defrag \u2212 online defragmenter for ext4 filesystem<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>e4defrag<\/b> [ <b>\u2212c<\/b> ] [ <b>\u2212v<\/b> ] <i>target<\/i> &#8230;<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>e4defrag<\/b> reduces fragmentation of extent based file. The file targeted by <b>e4defrag<\/b> is created on ext4 filesystem made with &#8220;-O extent&#8221; option (see <b>mke2fs<\/b>(8)). The targeted file gets more contiguous blocks and improves the file access speed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>target<\/i> is a regular file, a directory, or a device that is mounted as ext4 filesystem. If <i>target<\/i> is a directory, <b>e4defrag<\/b> reduces fragmentation of all files in it. If <i>target<\/i> is a device, <b>e4defrag<\/b> gets the mount point of it and reduces fragmentation of all files in this mount point.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><b>\u2212c<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Get a current fragmentation count and an ideal fragmentation count, and calculate fragmentation score based on them. By seeing this score, we can determine whether we should execute <b>e4defrag<\/b> to <i>target<\/i>. When used with <b>\u2212v<\/b> option, the current fragmentation count and the ideal fragmentation count are printed for each file.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%; margin-top: 1em\">Also this option outputs the average data size in one extent. If you see it, you\u2019ll find the file has ideal extents or not. Note that the maximum extent size is 131072KB in ext4 filesystem (if block size is 4KB).<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">If this option is specified, <i>target<\/i> is never defragmented.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><b>\u2212v<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Print error messages and the fragmentation count before and after defrag for each file.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>e4defrag<\/b> does not support swap file, files in lost+found directory, and files allocated in indirect blocks. When <i>target<\/i> is a device or a mount point, <b>e4defrag<\/b> doesn\u2019t defragment files in mount point of other device.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It is safe to run e4defrag on a file while it is actively in use by another application. Since the contents of file blocks are copied using the page cache, this can result in a performance slowdown to both e4defrag and the application due to contention over the system\u2019s memory and disk bandwidth.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the file system\u2019s free space is fragmented, or if there is insufficient free space available, e4defrag may not be able to improve the file\u2019s fragmentation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Non-privileged users can execute <b>e4defrag<\/b> to their own file, but the score is not printed if <b>\u2212c<\/b> option is specified. Therefore, it is desirable to be executed by root user.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Written by Akira Fujita <a-fujita@rs.jp.nec.com> and Takashi Sato <t-sato@yk.jp.nec.com>.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>mke2fs<\/b>(8), <b>mount<\/b>(8).<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  e4defrag \u2212 online defragmenter for ext4 filesystem <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,733,4],"class_list":["post-3617","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-e4defrag","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3617","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3617"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3617\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3617"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3617"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3617"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}