{
    "content": [
        {
            "type": "text",
            "text": "# btrfstune(8) (man)\n\n**Summary:** btrfstune - tune various filesystem parameters\n\n**Synopsis:** btrfstune [options] <device> [<device>...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -f | — | — | Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure that you are aware of the dangers. |\n| -m | — | — | (since kernel: 5.0) change fsid stored as metadatauuid to a randomly generated UUID, see also -U -M <UUID> (since kernel |\n| -n | — | — | (since kernel: 3.14) Enable no-holes feature (more efficient representation of file holes), enabled by mkfs feature no-h |\n| -r | — | — | (since kernel: 3.7) Enable extended inode refs (hardlink limit per file in a directory is 65536), enabled by mkfs featur |\n| -u | — | — | Change fsid to a randomly generated UUID or continue previous fsid change operation in case it was interrupted. -U <UUID |\n| -x | — | — | (since kernel: 3.10) Enable skinny metadata extent refs (more efficient representation of extents), enabled by mkfs feat |\n\n## See Also\n\n- btrfs(5)\n- btrfs-balance(8)\n- mkfs.btrfs(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (12 lines)\n- **OPTIONS** (1 lines) — 6 subsections\n  - -f (3 lines)\n  - -m (16 lines)\n  - -n (5 lines)\n  - -r (21 lines)\n  - -u (17 lines)\n  - -x (8 lines)\n- **EXIT STATUS** (2 lines)\n- **COMPATIBILITY NOTE** (4 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nbtrfstune - tune various filesystem parameters\n\n### SYNOPSIS\n\nbtrfstune [options] <device> [<device>...]\n\n### DESCRIPTION\n\nbtrfstune can be used to enable, disable, or set various filesystem parameters. The\nfilesystem must be unmounted.\n\nThe common usecase is to enable features that were not enabled at mkfs time. Please make sure\nthat you have kernel support for the features. You can find a complete list of features and\nkernel version of their introduction at\nhttps://btrfs.wiki.kernel.org/index.php/Changelog#Byfeature . Also, the manual page\nmkfs.btrfs(8) contains more details about the features.\n\nSome of the features could be also enabled on a mounted filesystem by other means. Please\nrefer to the FILESYSTEM FEATURES in btrfs(5).\n\n### OPTIONS\n\n#### -f\n\nAllow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure that you\nare aware of the dangers.\n\n#### -m\n\n(since kernel: 5.0)\n\nchange fsid stored as metadatauuid to a randomly generated UUID, see also -U\n\n-M <UUID>\n(since kernel: 5.0)\n\nchange fsid stored as metadatauuid to a given UUID, see also -U\n\nThe metadatauuid is stored only in the superblock and is a backward incompatible change.\nThe fsid in metadata blocks remains unchanged and is not overwritten, thus the whole\noperation is significantly faster than -U.\n\nThe new metadatauuid can be used for mount by UUID and is also used to identify devices\nof a multi-device filesystem.\n\n#### -n\n\n(since kernel: 3.14)\n\nEnable no-holes feature (more efficient representation of file holes), enabled by mkfs\nfeature no-holes.\n\n#### -r\n\n(since kernel: 3.7)\n\nEnable extended inode refs (hardlink limit per file in a directory is 65536), enabled by\nmkfs feature extref.\n\n-S <0|1>\nEnable seeding on a given device. Value 1 will enable seeding, 0 will disable it.\n\nA seeding filesystem is forced to be mounted read-only. A new device can be added to the\nfilesystem and will capture all writes keeping the seeding device intact. See also\nsection SEEDING DEVICE in btrfs(5).\n\nWarning\nClearing the seeding flag on a device may be dangerous. If a previously-seeding\ndevice is changed, all filesystems that used that device will become unmountable.\nSetting the seeding flag back will not fix that.\n\nA valid usecase is seeding device as a base image. Clear the seeding flag, update the\nfilesystem and make it seeding again, provided that it’s OK to throw away all\nfilesystems built on top of the previous base.\n\n#### -u\n\nChange fsid to a randomly generated UUID or continue previous fsid change operation in\ncase it was interrupted.\n\n-U <UUID>\nChange fsid to UUID in all metadata blocks.\n\nThe UUID should be a 36 bytes string in printf(3) format \"%08x-%04x-%04x-%04x-%012x\". If\nthere is a previous unfinished fsid change, it will continue only if the UUID matches the\nunfinished one or if you use the option -u.\n\nAll metadata blocks are rewritten, this may take some time, but the final filesystem\ncompatibility is unaffected, unlike -M.\n\nWarning\nCancelling or interrupting a UUID change operation will make the filesystem\ntemporarily unmountable. To fix it, rerun btrfstune -u and let it complete.\n\n#### -x\n\n(since kernel: 3.10)\n\nEnable skinny metadata extent refs (more efficient representation of extents), enabled by\nmkfs feature skinny-metadata.\n\nAll newly created extents will use the new representation. To completely switch the\nentire filesystem, run a full balance of the metadata. Please refer to btrfs-balance(8).\n\n### EXIT STATUS\n\nbtrfstune returns 0 if no error happened, 1 otherwise.\n\n### COMPATIBILITY NOTE\n\nThis deprecated tool exists for historical reasons but is still in use today. Its\nfunctionality will be merged to the main tool, at which time btrfstune will be declared\nobsolete and scheduled for removal.\n\n### SEE ALSO\n\nbtrfs(5), btrfs-balance(8), mkfs.btrfs(8)\n\n\n\nBtrfs v5.16.2                                02/16/2022                                 BTRFSTUNE(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "btrfstune",
        "section": "8",
        "mode": "man",
        "summary": "btrfstune - tune various filesystem parameters",
        "synopsis": "btrfstune [options] <device> [<device>...]",
        "flags": [
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Allow dangerous changes, e.g. clear the seeding flag or change fsid. Make sure that you are aware of the dangers."
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "(since kernel: 5.0) change fsid stored as metadatauuid to a randomly generated UUID, see also -U -M <UUID> (since kernel: 5.0) change fsid stored as metadatauuid to a given UUID, see also -U The metadatauuid 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 -U. The new metadatauuid can be used for mount by UUID and is also used to identify devices of a multi-device filesystem."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "(since kernel: 3.14) Enable no-holes feature (more efficient representation of file holes), enabled by mkfs feature no-holes."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "(since kernel: 3.7) Enable extended inode refs (hardlink limit per file in a directory is 65536), enabled by mkfs feature extref. -S <0|1> Enable seeding on a given device. Value 1 will enable seeding, 0 will disable it. A seeding filesystem is forced to be mounted read-only. A new device can be added to the filesystem and will capture all writes keeping the seeding device intact. See also section SEEDING DEVICE in btrfs(5). Warning Clearing the seeding flag on a device may be dangerous. If a previously-seeding device is changed, all filesystems that used that device will become unmountable. Setting the seeding flag back will not fix that. A valid usecase is seeding device as a base image. Clear the seeding flag, update the filesystem and make it seeding again, provided that it’s OK to throw away all filesystems built on top of the previous base."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "Change fsid to a randomly generated UUID or continue previous fsid change operation in case it was interrupted. -U <UUID> Change fsid to UUID in all metadata blocks. The UUID should be a 36 bytes string in printf(3) format \"%08x-%04x-%04x-%04x-%012x\". If there is a previous unfinished fsid change, it will continue only if the UUID matches the unfinished one or if you use the option -u. All metadata blocks are rewritten, this may take some time, but the final filesystem compatibility is unaffected, unlike -M. Warning Cancelling or interrupting a UUID change operation will make the filesystem temporarily unmountable. To fix it, rerun btrfstune -u and let it complete."
            },
            {
                "flag": "-x",
                "long": null,
                "arg": null,
                "description": "(since kernel: 3.10) Enable skinny metadata extent refs (more efficient representation of extents), enabled by mkfs feature skinny-metadata. 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 btrfs-balance(8)."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "btrfs",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs/5/json"
            },
            {
                "name": "btrfs-balance",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-balance/8/json"
            },
            {
                "name": "mkfs.btrfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-f",
                        "lines": 3,
                        "flag": "-f"
                    },
                    {
                        "name": "-m",
                        "lines": 16,
                        "flag": "-m"
                    },
                    {
                        "name": "-n",
                        "lines": 5,
                        "flag": "-n"
                    },
                    {
                        "name": "-r",
                        "lines": 21,
                        "flag": "-r"
                    },
                    {
                        "name": "-u",
                        "lines": 17,
                        "flag": "-u"
                    },
                    {
                        "name": "-x",
                        "lines": 8,
                        "flag": "-x"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY NOTE",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}