# xfs_admin(8) - man - phpman

> **TLDR:** Tune an XFS filesystem.
>
- Display the filesystem label:
  `sudo xfs_admin {{-l|--list}} {{/dev/sdX}}`
- Set the filesystem label:
  `sudo xfs_admin {{-L|--Label}} "{{label}}" {{/dev/sdX}}`
- Display the filesystem UUID:
  `sudo xfs_admin {{-u|--uuid}} {{/dev/sdX}}`
- Set the filesystem UUID (use with caution):
  `sudo xfs_admin {{-U|--UUID}} {{uuid}} {{/dev/sdX}}`
- Generate a new UUID for the filesystem:
  `sudo xfs_admin {{-U|--UUID}} generate {{/dev/sdX}}`
- Display help:
  `xfs_admin`

*Source: tldr-pages*

---

[xfs_admin(8)](https://www.chedong.com/phpMan.php/man/xfsadmin/8/markdown)                           System Manager's Manual                          [xfs_admin(8)](https://www.chedong.com/phpMan.php/man/xfsadmin/8/markdown)



## NAME
       xfs_admin - change parameters of an XFS filesystem

## SYNOPSIS
       **xfs**___**admin**  [ **-eflpu** ] [ **-O** _featurelist_ ] [ **-c** **0**|**1** ] [ **-L** _label_ ] [ **-U** _uuid_ ] [ **-r** _rtdev_ ] _de__‐
       _vice_ [ _logdev_ ]
       **xfs**___**admin** **-V**

## DESCRIPTION
       **xfs**___**admin** uses the **xfs**___**[db**(8)](https://www.chedong.com/phpMan.php/man/db/8/markdown) command to modify various parameters of a filesystem.

       Devices that are mounted cannot be modified.  Administrators must unmount filesystems  before
       **xfs**___**admin**  or **xfs**___**[db**(8)](https://www.chedong.com/phpMan.php/man/db/8/markdown) can convert parameters.  A number of parameters of a mounted filesys‐
       tem can be examined and modified using the **xfs**___**[growfs**(8)](https://www.chedong.com/phpMan.php/man/growfs/8/markdown) command.

       The optional **logdev** parameter specifies the device special file where the filesystem's exter‐
       nal  log  resides.   This is required only for filesystems that use an external log.  See the
       **mkfs.xfs** **-l** option, and refer to [**xfs**(5)](https://www.chedong.com/phpMan.php/man/xfs/5/markdown) for a detailed description of the XFS log.

## OPTIONS
### -e
              abled (for legacy filesystems, it can't be disabled anymore at mkfs time).

              This option only applies to the deprecated V4 format.

### -f
              _vice_ (see the **mkfs.xfs** **-d** _file_ option).

### -j

              This option only applies to the deprecated V4 format.

### -l

### -p

              This option only applies to the deprecated V4 format.

### -u

### -c

              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.

### -L
              Set the filesystem label to _label_.  XFS filesystem labels can be at most 12 characters
              long;  if  _label_  is longer than 12 characters, **xfs**___**admin** will truncate it and print a
              warning message.  The filesystem label can be cleared using the special "**--"** **value** **for**
              _label_.

### -O
              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 **xfs**___**repair** **-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 **xfs**___**re**‐‐
              **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.

### -U
              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.

### -r
              Specifies the device special file where the  filesystem's  realtime  section  resides.
              Only for those filesystems which use a realtime section.

### -V

       The [**mount**(8)](https://www.chedong.com/phpMan.php/man/mount/8/markdown) manual entry describes how to mount a filesystem using its label or UUID, rather
       than its block special device name.

## SEE ALSO
       [**mkfs.xfs**(8)](https://www.chedong.com/phpMan.php/man/mkfs.xfs/8/markdown), [**mount**(8)](https://www.chedong.com/phpMan.php/man/mount/8/markdown), **xfs**___**[db**(8)](https://www.chedong.com/phpMan.php/man/db/8/markdown), **xfs**___**[growfs**(8)](https://www.chedong.com/phpMan.php/man/growfs/8/markdown), **xfs**___**[repair**(8)](https://www.chedong.com/phpMan.php/man/repair/8/markdown), [**xfs**(5)](https://www.chedong.com/phpMan.php/man/xfs/5/markdown).



                                                                                        [xfs_admin(8)](https://www.chedong.com/phpMan.php/man/xfsadmin/8/markdown)
