{"id":3319,"date":"2022-12-20T17:02:20","date_gmt":"2022-12-20T20:02:20","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/btrfstune-man8\/"},"modified":"2022-12-20T17:02:20","modified_gmt":"2022-12-20T20:02:20","slug":"btrfstune-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/btrfstune-man8\/","title":{"rendered":"BTRFSTUNE (man8)"},"content":{"rendered":"<h1 align=\"center\">BTRFSTUNE<\/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=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#COMPATIBILITY NOTE\">COMPATIBILITY NOTE<\/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\">btrfstune \u2212 tune various filesystem parameters<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfstune<\/b> [options] <i><device><\/i> [<i><device><\/i>&#8230;]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfstune<\/b> can be used to enable, disable, or set various filesystem parameters. The filesystem must be unmounted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The common usecase is to enable features that were not enabled at mkfs time. Please make sure that you have kernel support for the features. You can find a complete list of features and kernel version of their introduction at <b><font color=\"#0000FF\">https:\/\/btrfs.wiki.kernel.org\/index.php\/Changelog#By_feature<\/font><\/b> <font color=\"#000000\">. Also, the manual page <b>mkfs.btrfs<\/b>(8) contains more details about the features.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Some of the features could be also enabled on a mounted filesystem by other means. Please refer to the <i>FILESYSTEM FEATURES<\/i> in <b>btrfs<\/b>(5).<\/font><\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212f<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure that you are aware of the dangers.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212m<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">(since kernel: 5.0)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">change fsid stored as <i>metadata_uuid<\/i> to a randomly generated UUID, see also <i>\u2212U<\/i><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212M <i><UUID><\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">(since kernel: 5.0)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">change fsid stored as <i>metadata_uuid<\/i> to a given UUID, see also <i>\u2212U<\/i><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">The metadata_uuid is stored only in the superblock and is a backward incompatible change. The fsid in metadata blocks remains unchanged and is not overwritten, thus the whole operation is significantly faster than <i>\u2212U<\/i>.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">The new metadata_uuid can be used for mount by UUID and is also used to identify devices of a multi\u2212device filesystem.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212n<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">(since kernel: 3.14)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Enable no\u2212holes feature (more efficient representation of file holes), enabled by mkfs feature <i>no\u2212holes<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212r<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">(since kernel: 3.7)<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">Enable extended inode refs (hardlink limit per file in a directory is 65536), enabled by mkfs feature <i>extref<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212S <i><0|1><\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Enable seeding on a given device. Value 1 will enable seeding, 0 will disable it.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">A seeding filesystem is forced to be mounted read\u2212only. A new device can be added to the filesystem and will capture all writes keeping the seeding device intact. See also section <i>SEEDING DEVICE<\/i> in <b>btrfs<\/b>(5).<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\"><b><big>Warning<\/big><\/b> <br \/> Clearing the seeding flag on a device may be dangerous. If a previously\u2212seeding device is changed, all filesystems that used that device will become unmountable. Setting the seeding flag back will not fix that.<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\">A valid usecase is <i>seeding device as a base image<\/i>. Clear the seeding flag, update the filesystem and make it seeding again, provided that it\u2019s OK to throw away all filesystems built on top of the previous base.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big>\u2212u<\/big><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><big>Change fsid to a randomly generated UUID or continue previous fsid change operation in case it was interrupted.<\/big><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big>\u2212U <i><UUID><\/i><\/big><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><big>Change fsid to <i>UUID<\/i> in all metadata blocks.<\/big><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><big>The <i>UUID<\/i> should be a 36 bytes string in <b>printf<\/b>(3) format <i>&#8220;%08x\u2212%04x\u2212%04x\u2212%04x\u2212%012x&#8221;<\/i>. If there is a previous unfinished fsid change, it will continue only if the <i>UUID<\/i> matches the unfinished one or if you use the option <i>\u2212u<\/i>.<\/big><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><big>All metadata blocks are rewritten, this may take some time, but the final filesystem compatibility is unaffected, unlike <i>\u2212M<\/i>.<\/big><\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\"><big><b><big>Warning<\/big><\/b> <br \/> Cancelling or interrupting a UUID change operation will make the filesystem temporarily unmountable. To fix it, rerun <i>btrfstune \u2212u<\/i> and let it complete.<\/big><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big><big>\u2212x<\/big><\/big><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\"><big><big>(since kernel: 3.10)<\/big><\/big><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><big><big>Enable skinny metadata extent refs (more efficient representation of extents), enabled by mkfs feature <i>skinny\u2212metadata<\/i>.<\/big><\/big><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\"><big><big>All newly created extents will use the new representation. To completely switch the entire filesystem, run a full balance of the metadata. Please refer to <b>btrfs\u2212balance<\/b>(8).<\/big><\/big><\/font><\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big><big><b>btrfstune<\/b> returns 0 if no error happened, 1 otherwise.<\/big><\/big><\/font><\/p>\n<h2>COMPATIBILITY NOTE <a name=\"COMPATIBILITY NOTE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big><big>This deprecated tool exists for historical reasons but is still in use today. Its functionality will be merged to the main tool, at which time <b>btrfstune<\/b> will be declared obsolete and scheduled for removal.<\/big><\/big><\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><big><big><b>btrfs<\/b>(5), <b>btrfs\u2212balance<\/b>(8), <b>mkfs.btrfs<\/b>(8)<\/big><\/big><\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  btrfstune \u2212 tune various filesystem parameters <\/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,449,4],"class_list":["post-3319","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-btrfstune","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3319","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=3319"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3319\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}