{
    "content": [
        {
            "type": "text",
            "text": "# xfs_admin(8) (man)\n\n## TLDR\n\n> Tune an XFS filesystem.\n\n- Display the filesystem label:\n  `sudo xfs_admin {{-l|--list}} {{/dev/sdX}}`\n- Set the filesystem label:\n  `sudo xfs_admin {{-L|--Label}} \"{{label}}\" {{/dev/sdX}}`\n- Display the filesystem UUID:\n  `sudo xfs_admin {{-u|--uuid}} {{/dev/sdX}}`\n- Set the filesystem UUID (use with caution):\n  `sudo xfs_admin {{-U|--UUID}} {{uuid}} {{/dev/sdX}}`\n- Generate a new UUID for the filesystem:\n  `sudo xfs_admin {{-U|--UUID}} generate {{/dev/sdX}}`\n- Display help:\n  `xfs_admin`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** xfsadmin - change parameters of an XFS filesystem\n\n**Synopsis:** xfsadmin  [ -eflpu ] [ -O featurelist ] [ -c 0|1 ] [ -L label ] [ -U uuid ] [ -r rtdev ] de‐\nvice [ logdev ]\nxfsadmin -V\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -e | — | — | abled (for legacy filesystems, it can't be disabled anymore at mkfs time). This option only applies to the deprecated V4 |\n| -f | — | — | vice (see the mkfs.xfs -d file option). |\n| -j | — | — | This option only applies to the deprecated V4 format. |\n| -l | — | — |  |\n| -p | — | — | This option only applies to the deprecated V4 format. |\n| -u | — | — |  |\n| -c | — | — | Lazy-counters may not be disabled on Version 5 superblock filesystems (i.e. those with metadata CRCs enabled). In other  |\n| -L | — | — | Set the filesystem label to label. XFS filesystem labels can be at most 12 characters long; if label is longer than 12 c |\n| -O | — | — | Add or remove features on an existing V5 filesystem. The features should be specified as a comma-separated list. status  |\n| -U | — | — | Set the UUID of the filesystem to uuid. A sample UUID looks like this: \"c1b9d5a2-f162-11cf-9ece-0020afc76f16\". The uuid  |\n| -r | — | — | Specifies the device special file where the filesystem's realtime section resides. Only for those filesystems which use  |\n| -V | — | — | The mount(8) manual entry describes how to mount a filesystem using its label or UUID, rather than its block special dev |\n\n## See Also\n\n- mkfs.xfs(8)\n- mount(8)\n- xfsdb(8)\n- xfsgrowfs(8)\n- xfsrepair(8)\n- xfs(5)\n- xfsadmin(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (10 lines)\n- **OPTIONS** (1 lines) — 12 subsections\n  - -e (4 lines)\n  - -f (2 lines)\n  - -j (2 lines)\n  - -l (1 lines)\n  - -p (2 lines)\n  - -u (1 lines)\n  - -c (14 lines)\n  - -L (5 lines)\n  - -O (23 lines)\n  - -U (8 lines)\n  - -r (3 lines)\n  - -V (3 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nxfsadmin - change parameters of an XFS filesystem\n\n### SYNOPSIS\n\nxfsadmin  [ -eflpu ] [ -O featurelist ] [ -c 0|1 ] [ -L label ] [ -U uuid ] [ -r rtdev ] de‐\nvice [ logdev ]\nxfsadmin -V\n\n### DESCRIPTION\n\nxfsadmin uses the xfsdb(8) command to modify various parameters of a filesystem.\n\nDevices that are mounted cannot be modified.  Administrators must unmount filesystems  before\nxfsadmin  or xfsdb(8) can convert parameters.  A number of parameters of a mounted filesys‐\ntem can be examined and modified using the xfsgrowfs(8) command.\n\nThe optional logdev parameter specifies the device special file where the filesystem's exter‐\nnal  log  resides.   This is required only for filesystems that use an external log.  See the\nmkfs.xfs -l option, and refer to xfs(5) for a detailed description of the XFS log.\n\n### OPTIONS\n\n#### -e\n\nabled (for legacy filesystems, it can't be disabled anymore at mkfs time).\n\nThis option only applies to the deprecated V4 format.\n\n#### -f\n\nvice (see the mkfs.xfs -d file option).\n\n#### -j\n\nThis option only applies to the deprecated V4 format.\n\n#### -l\n\n#### -p\n\nThis option only applies to the deprecated V4 format.\n\n#### -u\n\n#### -c\n\nLazy-counters may not be disabled on Version 5 superblock filesystems (i.e. those with\nmetadata CRCs enabled).\n\nIn other words, this option only applies to the deprecated V4 format.\n\nThis  operation  may  take  quite  a  bit  of  time on large filesystems as the entire\nfilesystem needs to be scanned when this option is changed.\n\nWith lazy-counters enabled, the superblock is not modified or logged on  every  change\nof  the  free-space  and  inode counters. Instead, enough information is kept in other\nparts of the filesystem to be able to maintain the counter values without  needing  to\nkeep  them  in  the  superblock. This gives significant improvements in performance on\nsome configurations and metadata intensive workloads.\n\n#### -L\n\nSet the filesystem label to label.  XFS filesystem labels can be at most 12 characters\nlong;  if  label  is longer than 12 characters, xfsadmin will truncate it and print a\nwarning message.  The filesystem label can be cleared using the special \"--\" value for\nlabel.\n\n#### -O\n\nAdd or remove features on an existing V5 filesystem.  The features should be specified\nas a comma-separated list.  status should be either 0 to disable the feature or  1  to\nenable the feature.  Note, however, that most features cannot be disabled.\n\nNOTE:  Administrators  must ensure the filesystem is clean by running xfsrepair -n to\ninspect the filesystem before performing the upgrade.  If corruption is found,  recov‐\nery  procedures (e.g. reformat followed by restoration from backup; or running xfsre‐‐\npair without the -n) must be followed to clean the filesystem.\n\nSupported features are as follows:\n\ninobtcount\nKeep a count the number of blocks in each inode btree in the  AGI.   This  reduces\nmount time by speeding up metadata space reservation calculations.  The filesystem\ncannot be downgraded after this feature is enabled.  Once enabled, the  filesystem\nwill not be writable by older kernels.  This feature was added to Linux 5.10.\n\nbigtime\nUpgrade  a  filesystem  to  support  larger  timestamps  up to the year 2486.  The\nfilesystem cannot be downgraded after this feature is enabled.  Once enabled,  the\nfilesystem  will  not  be  mountable  by older kernels.  This feature was added to\nLinux 5.10.\n\n#### -U\n\nSet  the  UUID  of  the  filesystem  to  uuid.   A  sample  UUID  looks   like   this:\n\"c1b9d5a2-f162-11cf-9ece-0020afc76f16\".   The uuid may also be nil, which will set the\nfilesystem UUID to the null UUID.  The uuid may also be generate, which will  generate\na new UUID for the filesystem.  Note that on CRC-enabled filesystems, this will set an\nincompatible flag such that older kernels will not be able to  mount  the  filesystem.\nTo  remove  this  incompatible flag, use restore, which will restore the original UUID\nand remove the incompatible feature flag as needed.\n\n#### -r\n\nSpecifies the device special file where the  filesystem's  realtime  section  resides.\nOnly for those filesystems which use a realtime section.\n\n#### -V\n\nThe mount(8) manual entry describes how to mount a filesystem using its label or UUID, rather\nthan its block special device name.\n\n### SEE ALSO\n\nmkfs.xfs(8), mount(8), xfsdb(8), xfsgrowfs(8), xfsrepair(8), xfs(5).\n\n\n\nxfsadmin(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xfs_admin",
        "section": "8",
        "mode": "man",
        "summary": "xfsadmin - change parameters of an XFS filesystem",
        "synopsis": "xfsadmin  [ -eflpu ] [ -O featurelist ] [ -c 0|1 ] [ -L label ] [ -U uuid ] [ -r rtdev ] de‐\nvice [ logdev ]\nxfsadmin -V",
        "tldr_summary": "Tune an XFS filesystem.",
        "tldr_examples": [
            {
                "description": "Display the filesystem label",
                "command": "sudo xfs_admin {{-l|--list}} {{/dev/sdX}}"
            },
            {
                "description": "Set the filesystem label",
                "command": "sudo xfs_admin {{-L|--Label}} \"{{label}}\" {{/dev/sdX}}"
            },
            {
                "description": "Display the filesystem UUID",
                "command": "sudo xfs_admin {{-u|--uuid}} {{/dev/sdX}}"
            },
            {
                "description": "Set the filesystem UUID (use with caution)",
                "command": "sudo xfs_admin {{-U|--UUID}} {{uuid}} {{/dev/sdX}}"
            },
            {
                "description": "Generate a new UUID for the filesystem",
                "command": "sudo xfs_admin {{-U|--UUID}} generate {{/dev/sdX}}"
            },
            {
                "description": "Display help",
                "command": "xfs_admin"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": "abled (for legacy filesystems, it can't be disabled anymore at mkfs time). This option only applies to the deprecated V4 format."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "vice (see the mkfs.xfs -d file option)."
            },
            {
                "flag": "-j",
                "long": null,
                "arg": null,
                "description": "This option only applies to the deprecated V4 format."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "This option only applies to the deprecated V4 format."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "Lazy-counters may not be disabled on Version 5 superblock filesystems (i.e. those with metadata CRCs enabled). In other words, this option only applies to the deprecated V4 format. This operation may take quite a bit of time on large filesystems as the entire filesystem needs to be scanned when this option is changed. With lazy-counters enabled, the superblock is not modified or logged on every change of the free-space and inode counters. Instead, enough information is kept in other parts of the filesystem to be able to maintain the counter values without needing to keep them in the superblock. This gives significant improvements in performance on some configurations and metadata intensive workloads."
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": "Set the filesystem label to label. XFS filesystem labels can be at most 12 characters long; if label is longer than 12 characters, xfsadmin will truncate it and print a warning message. The filesystem label can be cleared using the special \"--\" value for label."
            },
            {
                "flag": "-O",
                "long": null,
                "arg": null,
                "description": "Add or remove features on an existing V5 filesystem. The features should be specified as a comma-separated list. status should be either 0 to disable the feature or 1 to enable the feature. Note, however, that most features cannot be disabled. NOTE: Administrators must ensure the filesystem is clean by running xfsrepair -n to inspect the filesystem before performing the upgrade. If corruption is found, recov‐ ery procedures (e.g. reformat followed by restoration from backup; or running xfsre‐‐ pair without the -n) must be followed to clean the filesystem. Supported features are as follows: inobtcount Keep a count the number of blocks in each inode btree in the AGI. This reduces mount time by speeding up metadata space reservation calculations. The filesystem cannot be downgraded after this feature is enabled. Once enabled, the filesystem will not be writable by older kernels. This feature was added to Linux 5.10. bigtime Upgrade a filesystem to support larger timestamps up to the year 2486. The filesystem cannot be downgraded after this feature is enabled. Once enabled, the filesystem will not be mountable by older kernels. This feature was added to Linux 5.10."
            },
            {
                "flag": "-U",
                "long": null,
                "arg": null,
                "description": "Set the UUID of the filesystem to uuid. A sample UUID looks like this: \"c1b9d5a2-f162-11cf-9ece-0020afc76f16\". The uuid may also be nil, which will set the filesystem UUID to the null UUID. The uuid may also be generate, which will generate a new UUID for the filesystem. Note that on CRC-enabled filesystems, this will set an incompatible flag such that older kernels will not be able to mount the filesystem. To remove this incompatible flag, use restore, which will restore the original UUID and remove the incompatible feature flag as needed."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "Specifies the device special file where the filesystem's realtime section resides. Only for those filesystems which use a realtime section."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": "The mount(8) manual entry describes how to mount a filesystem using its label or UUID, rather than its block special device name."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "mkfs.xfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.xfs/8/json"
            },
            {
                "name": "mount",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
            },
            {
                "name": "xfsdb",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/xfsdb/8/json"
            },
            {
                "name": "xfsgrowfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/xfsgrowfs/8/json"
            },
            {
                "name": "xfsrepair",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/xfsrepair/8/json"
            },
            {
                "name": "xfs",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/xfs/5/json"
            },
            {
                "name": "xfsadmin",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/xfsadmin/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-e",
                        "lines": 4,
                        "flag": "-e"
                    },
                    {
                        "name": "-f",
                        "lines": 2,
                        "flag": "-f"
                    },
                    {
                        "name": "-j",
                        "lines": 2,
                        "flag": "-j"
                    },
                    {
                        "name": "-l",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-p",
                        "lines": 2,
                        "flag": "-p"
                    },
                    {
                        "name": "-u",
                        "lines": 1,
                        "flag": "-u"
                    },
                    {
                        "name": "-c",
                        "lines": 14,
                        "flag": "-c"
                    },
                    {
                        "name": "-L",
                        "lines": 5,
                        "flag": "-L"
                    },
                    {
                        "name": "-O",
                        "lines": 23,
                        "flag": "-O"
                    },
                    {
                        "name": "-U",
                        "lines": 8,
                        "flag": "-U"
                    },
                    {
                        "name": "-r",
                        "lines": 3,
                        "flag": "-r"
                    },
                    {
                        "name": "-V",
                        "lines": 3,
                        "flag": "-V"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}