{
    "mode": "man",
    "parameter": "xfs_db",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/xfs_db/8/json",
    "generated": "2026-10-09T13:04:24Z",
    "synopsis": "xfsdb [ -c cmd ] ... [ -i|r|x|F ] [ -f ] [ -l logdev ] [ -p progname ] device",
    "sections": {
        "NAME": {
            "content": "xfsdb - debug an XFS filesystem\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xfsdb [ -c cmd ] ... [ -i|r|x|F ] [ -f ] [ -l logdev ] [ -p progname ] device",
            "subsections": [
                {
                    "name": "xfs_db -V",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "xfsdb  is used to examine an XFS filesystem. Under rare circumstances it can also be used to\nmodify an XFS filesystem, but that task is normally left to xfsrepair(8) or to scripts  such\nas xfsadmin(8) that run xfsdb.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-c _",
                    "content": "line. Multiple -c arguments may be given. The commands are run in the sequence  given,\nthen the program exits.\n",
                    "flag": "-c"
                },
                {
                    "name": "-f",
                    "content": "vice  (see  the  mkfs.xfs(8) -d file option).  This might happen if an image copy of a\nfilesystem has been made into an ordinary file with xfscopy(8).\n",
                    "flag": "-f"
                },
                {
                    "name": "-F",
                    "content": "use in xfsmetadump.\n",
                    "flag": "-F"
                },
                {
                    "name": "-i",
                    "content": "for shell scripts which must only operate on filesystems in  a  guaranteed  consistent\nstate  (either unmounted or mounted read-only). These semantics are slightly different\nto that of the -r option.\n",
                    "flag": "-i"
                },
                {
                    "name": "-l _",
                    "content": "Specifies the device where the filesystems  external  log  resides.   Only  for  those\nfilesystems  which  use  an  external log. See the mkfs.xfs(8) -l option, and refer to\nxfs(5) for a detailed description of the XFS log.\n",
                    "flag": "-l"
                },
                {
                    "name": "-p _",
                    "content": "Set the program name to progname for prompts and  some  error  messages,  the  default\nvalue is xfsdb.\n",
                    "flag": "-p"
                },
                {
                    "name": "-r",
                    "content": "mounted.  It is only necessary to omit this  flag  if  a  command  that  changes  data\n(write, blocktrash, crc) is to be used.\n",
                    "flag": "-r"
                },
                {
                    "name": "-x",
                    "content": "date) commands.\n",
                    "flag": "-x"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                }
            ]
        },
        "CONCEPTS": {
            "content": "xfsdb commands can be broken up into two classes. Most commands are for the  navigation  and\ndisplay of data structures in the filesystem.  Other commands are for scanning the filesystem\nin some way.\n\nCommands which are used to navigate the filesystem structure take arguments which reflect the\nnames  of  filesystem  structure fields.  There can be multiple field names separated by dots\nwhen the underlying structures are nested, as in C.  The field names can be  indexed  (as  an\narray  index)  if  the underlying field is an array.  The array indices can be specified as a\nrange, two numbers separated by a dash.\n\nxfsdb maintains a current address in the filesystem.  The granularity of the  address  is  a\nfilesystem  structure.   This  can  be  a filesystem block, an inode or quota (smaller than a\nfilesystem block), or a directory block (could be larger than a filesystem block).  There are\na variety of commands to set the current address.  Associated with the current address is the\ncurrent data type, which is the structural type of this  data.   Commands  which  follow  the\nstructure of the filesystem always set the type as well as the address.  Commands which exam‐\nine  pieces of an individual file (inode) need the current inode to be set, this is done with\nthe inode command.\n\nThe current address/type information is actually maintained in a stack that can be explicitly\nmanipulated with the push, pop, and stack commands.  This allows for easy  examination  of  a\nnested  filesystem  structure.  Also, the last several locations visited are stored in a ring\nbuffer which can be manipulated with the forward, back, and ring commands.\n\nXFS filesystems are divided into a small number of allocation groups.  xfsdb maintains a no‐\ntion of the current allocation group which is manipulated by some commands. The initial allo‐\ncation group is 0.\n",
            "subsections": []
        },
        "COMMANDS": {
            "content": "Many commands have extensive online help. Use the help command for more details on  any  com‐\nmand.\n\na      See the addr command.\n\nablock filoff\nSet  current address to the offset filoff (a filesystem block number) in the attribute\narea of the current inode.\n\naddr [field-expression]\nSet current address to the value of the field-expression.  This is used to \"follow\"  a\nreference  in  one structure to the object being referred to. If no argument is given,\nthe current address is printed.\n\nagf [agno]\nSet current address to the AGF block for allocation group agno.   If  no  argument  is\ngiven, use the current allocation group.\n\nagfl [agno]\nSet  current  address  to the AGFL block for allocation group agno.  If no argument is\ngiven, use the current allocation group.\n\nagi [agno]\nSet current address to the AGI block for allocation group agno.   If  no  argument  is\ngiven, use the current allocation group.\n\nagresv [agno]\nDisplays the length, free block count, per-AG reservation size, and per-AG reservation\nusage for a given AG.  If no argument is given, display information for all AGs.\n\nattrremove [-r|-u|-s] [-n] name\nRemove the specified extended attribute from the current file.\n\n-r  Sets  the  attribute  in  the root namespace.  Only one namespace option can be\nspecified.\n\n-u  Sets the attribute in the user namespace.  Only one  namespace  option  can  be\nspecified.\n\n-s  Sets  the  attribute in the secure namespace.  Only one namespace option can be\nspecified.\n\n-n  Do not enable 'noattr2' mode on V4 filesystems.\n\nattrset [-r|-u|-s] [-n] [-R|-C] [-v namelen] name\nSets an extended attribute on the current file with the given name.\n\n-r  Sets the attribute in the root namespace.  Only one  namespace  option  can  be\nspecified.\n\n-u  Sets  the  attribute  in  the user namespace.  Only one namespace option can be\nspecified.\n\n-s  Sets the attribute in the secure namespace.  Only one namespace option  can  be\nspecified.\n\n-n  Do not enable 'noattr2' mode on V4 filesystems.\n\n-R  Replace the attribute.  The command will fail if the attribute does not already\nexist.\n\n-C  Create the attribute.  The command will fail if the attribute already exists.\n\n-v  Set the attribute value to a string of this length containing the letter 'v'.\n\nb      See the back command.\n\nback   Move to the previous location in the position ring.\n",
            "subsections": [
                {
                    "name": "blockfree",
                    "content": "Free  block usage information collected by the last execution of the blockget command.\nThis must be done before another blockget command can be given, presumably  with  dif‐\nferent arguments than the previous one.\n\nblockget [-npvs] [-b bno] ... [-i ino] ...\nGet block usage and check filesystem consistency.  The information is saved for use by\na subsequent blockuse, ncheck, or blocktrash command.\n\n-b  is  used  to  specify  filesystem block numbers about which verbose information\nshould be printed.\n\n-i  is used to specify inode numbers about  which  verbose  information  should  be\nprinted.\n\n-n  is  used  to  save  pathnames  for  inodes visited, this is used to support the\nxfsncheck(8) command. It also means that pathnames will be printed for  inodes\nthat  have  problems. This option uses a lot of memory so is not enabled by de‐\nfault.\n\n-p  causes error messages to be prefixed with the filesystem name being  processed.\nThis is useful if several copies of xfsdb are run in parallel.\n\n-s  restricts  output  to  severe  errors only. This is useful if the output is too\nlong otherwise.\n\n-v  enables verbose output. Messages will be printed  for  every  block  and  inode\nprocessed.\n\nblocktrash [-z] [-o offset] [-n count] [-x min] [-y max] [-s seed] [-0|1|2|3] [-t type] ...\nTrash  randomly  selected filesystem metadata blocks.  Trashing occurs to randomly se‐\nlected bits in the chosen blocks.  This command is available only  in  debugging  ver‐\nsions of xfsdb.  It is useful for testing xfsrepair(8).\n\n-0 | -1 | -2 | -3\nThese are used to set the operating mode for blocktrash.  Only one can be used:\n-0  changed  bits are cleared; -1 changed bits are set; -2 changed bits are in‐\nverted; -3 changed bits are randomized.\n\n-n  supplies the count of block-trashings to perform (default 1).\n\n-o  supplies the bit offset at which to start trashing the block.  If the value  is\npreceded  by a '+', the trashing will start at a randomly chosen offset that is\nlarger than the value supplied.  The default is to randomly  choose  an  offset\nanywhere in the block.\n\n-s  supplies a seed to the random processing.\n\n-t  gives  a type of blocks to be selected for trashing. Multiple -t options may be\ngiven. If no -t options are given then all metadata types can be trashed.\n\n-x  sets the minimum size of bit range to be trashed. The default value is 1.\n\n-y  sets the maximum size of bit range to be trashed. The default value is 1024.\n\n-z  trashes the block at the top of the stack.  It is not necessary to run blockget\nif this option is supplied.\n\nblockuse [-n] [-c count]\nPrint usage for current filesystem block(s).  For each block, the type  and  (if  any)\ninode are printed.\n\n-c  specifies  a  count  of  blocks to process. The default value is 1 (the current\nblock only).\n\n-n  specifies that file names should be printed. The prior  blockget  command  must\nhave also specified the -n option.\n\nbmap [-a] [-d] [block [len]]\nShow  the  block  map  for the current inode.  The map display can be restricted to an\narea of the file with the block and len arguments. If block is given and len is  omit‐\nted then 1 is assumed for len.\n\nThe  -a  and -d options are used to select the attribute or data area of the inode, if\nneither option is given then both areas are shown.\n"
                },
                {
                    "name": "btdump [-a] [-i]",
                    "content": "If the cursor points to a btree node, dump the btree from that block downward.  If in‐\nstead the cursor points to an inode, dump the data fork block mapping btree  if  there\nis  one.   If  the cursor points to a directory or extended attribute btree node, dump\nthat.  By default, only records stored in the btree are dumped.\n\n-a  If the cursor points at an inode, dump the  extended  attribute  block  mapping\nbtree, if present.\n\n-i  Dump all keys and pointers in intermediate btree nodes, and all records in leaf\nbtree nodes.\n\nbtheight [-b blksz] [-n recs] [-w max|min|absmax] btree types...\nFor a given number of btree records and a btree type, report the number of records and\nblocks  for  each  level of the btree, and the total number of blocks.  The btree type\nmust be given after the options.\n\nA     raw     btree     geometry     can     be     provided     in     the     format\n\"recordbytes:keybytes:ptrbytes:headertype\",  where  headertype is one of \"short\",\n\"long\", \"shortcrc\", or \"longcrc\".\n\nThe supported btree types are: bnobt, cntbt, inobt, finobt,  bmapbt,  refcountbt,  and\nrmapbt.  The magic value all can be used to walk through all btree types.\n\nOptions are as follows:\n\n-b  is  used to override the btree block size.  The default is the filesystem block\nsize.\n\n-n  is used to specify the number of records to store.  This argument is required.\n\n-w absmax\nshows the maximum possible height for the given btree types.\n\n-w max\nshows only the best case scenario, which is when the btree blocks are maximally\nloaded.\n\n-w min\nshows only the worst case scenario, which is when the  btree  blocks  are  half\nfull.\n\ncheck  See the blockget command.\n\nconvert type number [type number] ... type\nConvert from one address form to another.  The known types, with alternate names, are:\n\nagblock or agbno (filesystem block within an allocation group)\nagino or aginode (inode number within an allocation group)\nagnumber or agno (allocation group number)\nbboff or daddroff (byte offset in a daddr)\nblkoff or fsboff or agboff (byte offset in a agblock or fsblock)\nbyte or fsbyte (byte address in filesystem)\ndaddr or bb (disk address, 512-byte blocks)\nfsblock or fsb or fsbno (filesystem block, see the fsblock command)\nino or inode (inode number)\ninoidx or offset (index of inode in filesystem block)\ninooff or inodeoff (byte offset in inode)\n\nOnly  conversions  that  \"make  sense\" are allowed.  The compound form (with more than\nthree arguments) is useful for conversions such as convert agno ag agbno agb fsblock.\n"
                },
                {
                    "name": "crc [-i|-r|-v]",
                    "content": "Invalidates, revalidates, or validates the CRC (checksum) field of the current  struc‐\nture, if it has one.  This command is available only on CRC-enabled filesystems.  With\nno  argument,  validation  is  performed.  Each command will display the resulting CRC\nvalue and state.\n\n-i  Invalidate the structure's CRC value (incrementing it by one), and write it  to\ndisk.\n\n-r  Recalculate the current structure's correct CRC value, and write it to disk.\n\n-v  Validate and display the current value and state of the structure's CRC.\n\ndaddr [d]\nSet  current  address  to the daddr (512 byte block) given by d.  If no value for d is\ngiven, the current address is printed, expressed as a daddr.  The type is set to  data\n(uninterpreted).\n\ndblock filoff\nSet  current address to the offset filoff (a filesystem block number) in the data area\nof the current inode.\n\ndebug [flagbits]\nSet debug option bits. These are used for debugging xfsdb.  If no value is given  for\nflagbits,  print the current debug option bits. These are for the use of the implemen‐\ntor.\n\ndquot [-g|-p|-u] id\nSet current address to a group, project or user quota block for the given ID. Defaults\nto user quota.\n\ndumpiunlinked [-a agno ] [-b bucket ] [-q] [-v]\nDump the contents of unlinked buckets.\n\nOptions include:\n\n-a  Print only this AG's unlinked buckets.\n\n-b  Print only this bucket within each AGI.\n\n-q  Only print the essentials.\n\n-v  Print resource usage of each file on the unlinked lists.\n\necho [arg] ...\nEcho the arguments to the output.\n\nf      See the forward command.\n"
                },
                {
                    "name": "forward",
                    "content": "Move forward to the next entry in the position ring.\n"
                },
                {
                    "name": "frag [-adflqRrv]",
                    "content": "Get file fragmentation data. This prints information about fragmentation of file  data\nin  the filesystem (as opposed to fragmentation of freespace, for which see the freesp\ncommand). Every file in the filesystem is examined to see how far from ideal  its  ex‐\ntent mappings are. A summary is printed giving the totals.\n\n-v  sets  verbosity, every inode has information printed for it.  The remaining op‐\ntions select which inodes and extents are examined.  If no  options  are  given\nthen all are assumed set, otherwise just those given are enabled.\n\n-a  enables processing of attribute data.\n\n-d  enables processing of directory data.\n\n-f  enables processing of regular file data.\n\n-l  enables processing of symbolic link data.\n\n-q  enables processing of quota file data.\n\n-R  enables processing of realtime control file data.\n\n-r  enables processing of realtime file data.\n\nfreesp [-bcds] [-A alignment] [-a ag] ... [-e i] [-h h1] ... [-m m]\nSummarize  free  space  for the filesystem. The free blocks are examined and totalled,\nand displayed in the form of a histogram, with a count of extents  in  each  range  of\nfree extent sizes.\n\n-A  reports only free extents with starting blocks aligned to alignment blocks.\n\n-a  adds  ag to the list of allocation groups to be processed. If no -a options are\ngiven then all allocation groups are processed.\n\n-b  specifies that the histogram buckets are binary-sized, with the starting  sizes\nbeing the powers of 2.\n\n-c  specifies  that freesp will search the by-size (cnt) space Btree instead of the\ndefault by-block (bno) space Btree.\n\n-d  specifies that every free extent will be displayed.\n\n-e  specifies that the histogram buckets are equal-sized, with the  size  specified\nas i.\n\n-h  specifies  a starting block number for a histogram bucket as h1.  Multiple -h's\nare given to specify the complete set of buckets.\n\n-m  specifies that the histogram starting block numbers are powers of m.   This  is\nthe general case of -b.\n\n-s  specifies  that a final summary of total free extents, free blocks, and the av‐\nerage free extent size is printed.\n\nfsb    See the fsblock command.\n\nfsblock [fsb]\nSet current address to the fsblock value given by fsb.  If no value for fsb  is  given\nthe  current  address is printed, expressed as an fsb.  The type is set to data (unin‐\nterpreted). XFS filesystem block numbers are computed ((agno <<  agshift)  |  agblock)\nwhere  agshift  depends on the size of an allocation group. Use the convert command to\nconvert to and from this form. Block numbers given for file blocks (for instance  from\nthe bmap command) are in this form.\n\nfsmap [ start ] [ end ]\nPrints  the  mapping of disk blocks used by an XFS filesystem.  The map lists each ex‐\ntent used by files, allocation group metadata, journalling logs, and static filesystem\nmetadata, as well as any regions that are unused.  All blocks,  offsets,  and  lengths\nare  specified in units of 512-byte blocks, no matter what the filesystem's block size\nis.  The optional start and end arguments can be used to constrain  the  output  to  a\nparticular range of disk blocks.\n\nfuzz [-c] [-d] field action\nWrite garbage into a specific structure field on disk.  Expert mode must be enabled to\nuse this command.  The operation happens immediately; there is no buffering.\n\nThe fuzz command can take the following actions against a field:\n\nzeroes\nClears all bits in the field.\n\nones\nSets all bits in the field.\n\nfirstbit\nFlips the first bit in the field.  For a scalar value, this is the highest bit.\n\nmiddlebit\nFlips the middle bit in the field.\n\nlastbit\nFlips the last bit in the field.  For a scalar value, this is the lowest bit.\n\nadd Adds a small value to a scalar field.\n\nsub Subtracts a small value from a scalar field.\n\nrandom\nRandomizes the contents of the field.\n\nThe following switches affect the write behavior:\n\n-c  Skip  write  verifiers and CRC recalculation; allows invalid data to be written\nto disk.\n\n-d  Skip write verifiers but perform CRC recalculation; allows invalid data  to  be\nwritten to disk to test detection of invalid data.\n\nhash[-d]\"strings\nPrints  the  hash value of string using the hash function of the XFS directory and at‐\ntribute implementation.\n\nIf the -d option is specified, the directory-specific hash  function  is  used.   This\nonly makes a difference on filesystems with ascii case-insensitive lookups enabled.\n\nhashcoll [-a] [-s seed] [-n nr] [-p path] -i | names...\nCreate  directory  entries  or  extended  attributes names that all have the same hash\nvalue.  The metadump name obfuscation algorithm is used here.  Names  are  written  to\nstandard output, with a NULL between each name for use with xargs -0.\n-a  Create extended attribute names.\n-i  Read  the  first name to create from standard input.  Up to 255 bytes are read.\nIf this option is not specified, first names are taken from the command line.\n-n nr\nCreate this many duplicated names.  The default is to create one name.\n-p path\nCreate directory entries or extended attributes in this file instead of writing\nthe names to standard output.\n-s seed\nSeed the random number generator with this value.\n\nhelp [command]\nPrint help for one or all commands.\n\ninfo   Displays selected geometry information about the filesystem.  The output will have the\nsame format that mkfs.xfs(8) prints when creating a filesystem or  xfsinfo(8)  prints\nwhen querying a filesystem.\n\ninode [inode#]\nSet the current inode number. If no inode# is given, print the current inode number.\n\niunlink [-n nr ]\nAllocate inodes and put them on the unlinked list.\n\nOptions include:\n\n-n  Create  this number of unlinked inodes.  If not specified, 1 inode will be cre‐\nated.\n\nlabel [label]\nSet the filesystem label. The filesystem label can be used by mount(8) instead of  us‐\ning  a device special file.  The maximum length of an XFS label is 12 characters - use\nof a longer label will result in truncation and a warning will be issued. If no  label\nis given, the current filesystem label is printed.\n\nlog [stop | start filename]\nStart logging output to filename, stop logging, or print the current logging status.\n\nlogformat [-c cycle] [-s sunit]\nReformats the log to the specified log cycle and log stripe unit.  This has the effect\nof  clearing the log destructively.  If the log cycle is not specified, the log is re‐\nformatted to the current cycle.  If the log stripe unit is not specified,  the  stripe\nunit from the filesystem superblock is used.\n\nlogres Print  transaction reservation size information for each transaction type.  This makes\nit easier to find discrepancies in the reservation calculations between  xfsprogs  and\nthe kernel, which will help when diagnosing minimum log size calculation errors.\n\nls [-i] [paths]...\nList  the  contents  of a directory.  If a path resolves to a directory, the directory\nwill be listed.  If no paths are supplied and the IO cursor points at a directory  in‐\node, the contents of that directory will be listed.\n\nThe  output  format  is: directory cookie, inode number, file type, hash, name length,\nname.\n\n-i  Resolve each of the given paths to an inode number and print that  number.   If\nno  paths  are given and the IO cursor points to an inode, print the inode num‐\nber.\n\nmetadump [-egow] filename\nDumps metadata to a file. See xfsmetadump(8) for more information.\n\nncheck [-s] [-i ino] ...\nPrint name-inode pairs. A blockget -n command must be run first to gather the informa‐\ntion.\n\n-i  specifies an inode number to be printed. If no -i options are  given  then  all\ninodes are printed.\n\n-s  specifies that only setuid and setgid files are printed.\n\np      See the print command.\n\npath dirpath\nWalk  the  directory  tree to an inode using the supplied path.  Absolute and relative\npaths are supported.\n\npop    Pop location from the stack.\n\nprint [field-expression] ...\nPrint field values.  If no argument is given, print all fields in the  current  struc‐\nture.\n\npush [command]\nPush  location  to  the stack. If command is supplied, set the current location to the\nresults of command after pushing the old location.\n\nq      See the quit command.\n\nquit   Exit xfsdb.\n\nring [index]\nShow position ring (if no index argument is given), or move to a specific entry in the\nposition ring given by index.\n\nsb [agno]\nSet current address to SB header in allocation group agno.  If no agno is  given,  use\nthe current allocation group number.\n\nsource source-file\nProcess commands from source-file.  source commands can be nested.\n\nstack  View the location stack.\n\ntype [type]\nSet  the  current  data  type to type.  If no argument is given, show the current data\ntype.  The possible data types are: agf, agfl, agi,  attr,  bmapbta,  bmapbtd,  bnobt,\ncntbt,  data,  dir, dir2, dqblk, inobt, inode, log, refcntbt, rmapbt, rtbitmap, rtsum‐\nmary, sb, symlink and text.  See the TYPES section below for more information on these\ndata types.\n\ntimelimit [OPTIONS]\nPrint the minimum and maximum supported values for inode timestamps, quota  expiration\ntimers, and quota grace periods supported by this filesystem.  Options include:\n\n--bigtime\nPrint the time limits of an XFS filesystem with the bigtime feature enabled.\n\n--classic\nPrint the time limits of a classic XFS filesystem.\n\n--compact\nPrint all limits as raw values on a single line.\n\n--pretty\nPrint  the  timestamps  in the current locale's date and time format instead of\nraw seconds since the Unix epoch.\n\nuuid [uuid | generate | rewrite | restore]\nSet the filesystem universally unique identifier (UUID).  The filesystem UUID  can  be\nused by mount(8) instead of using a device special file.  The uuid can be set directly\nto  the  desired UUID, or it can be automatically generated using the generate option.\nThese options will both write the UUID into  every  copy  of  the  superblock  in  the\nfilesystem.   On  a  CRC-enabled  filesystem, this will set an incompatible superblock\nflag, and the filesystem will not be mountable with older kernels.  This  can  be  re‐\nverted  with the restore option, which will copy the original UUID back into place and\nclear the incompatible flag as needed.  rewrite copies the current UUID from the  pri‐\nmary  superblock  to all secondary copies of the superblock.  If no argument is given,\nthe current filesystem UUID is printed.\n\nversion [feature | versionnum features2]\nEnable selected features for a filesystem (certain features can be enabled on  an  un‐\nmounted  filesystem,  after  mkfs.xfs(8) has created the filesystem).  Support for un‐\nwritten extents can be enabled using the extflg option. Support for version 2 log for‐\nmat can be enabled using the log2 option. Support for extended attributes can  be  en‐\nabled  using  the  attr1  or attr2 option. Once enabled, extended attributes cannot be\ndisabled, but the user may toggle between attr1 and attr2 at will (older  kernels  may\nnot support the newer version).\n\nIf  no  argument is given, the current version and feature bits are printed.  With one\nargument, this command will write the updated version number into every  copy  of  the\nsuperblock  in  the  filesystem.  If two arguments are given, they will be used as nu‐\nmeric values for the versionnum and features2  bits  respectively,  and  their  string\nequivalent reported (but no modifications are made).\n\nwrite [-c|-d] [field value] ...\nWrite  a  value to disk.  Specific fields can be set in structures (struct mode), or a\nblock can be set to data values (data mode), or a block can be set  to  string  values\n(string  mode,  for  symlink  blocks).  The operation happens immediately: there is no\nbuffering.\n\nStruct mode is in effect when the current type  is  structural,  i.e.  not  data.  For\nstruct mode, the syntax is \"write field value\".\n\nData mode is in effect when the current type is data. In this case the contents of the\nblock  can  be shifted or rotated left or right, or filled with a sequence, a constant\nvalue, or a random value. In this mode write with no arguments gives more  information\non the allowed commands.\n\n-c  Skip  write  verifiers and CRC recalculation; allows invalid data to be written\nto disk.\n\n-d  Skip write verifiers but perform CRC recalculation.  This allows  invalid  data\nto be written to disk to test detection of invalid data.  (This is not possible\nfor some types.)\n"
                }
            ]
        },
        "TYPES": {
            "content": "This  section  gives  the  fields  in each structure type and their meanings.  Note that some\ntypes of block cover multiple actual structures, for instance directory blocks.\n\nagf       The AGF block is the header for block allocation information; it is in  the  second\n512-byte block of each allocation group.  The following fields are defined:\nmagicnum    AGF block magic number, 0x58414746 ('XAGF').\nversionnum  version number, currently 1.\nseqno       sequence number starting from 0.\nlength      size  in  filesystem blocks of the allocation group. All allocation\ngroups except the last one of the filesystem have the  superblock's\nagblocks value here.\nbnoroot     block  number  of the root of the Btree holding free space informa‐\ntion sorted by block number.\ncntroot     block number of the root of the Btree holding free  space  informa‐\ntion sorted by block count.\nbnolevel    number of levels in the by-block-number Btree.\ncntlevel    number of levels in the by-block-count Btree.\nflfirst     index into the AGFL block of the first active entry.\nfllast      index into the AGFL block of the last active entry.\nflcount     count of active entries in the AGFL block.\nfreeblks    count of blocks represented in the freespace Btrees.\nlongest     longest free space represented in the freespace Btrees.\nbtreeblks   number of blocks held in the AGF Btrees.\n\nagfl      The  AGFL block contains block numbers for use of the block allocator; it is in the\nfourth 512-byte block of each allocation group.  Each entry in the active list is a\nblock number within the allocation group that can be used for any purpose if  space\nruns  low.   The  AGF block fields flfirst, fllast, and flcount designate which en‐\ntries are currently active.  Entry space is allocated in a circular  manner  within\nthe AGFL block.  Fields defined:\nbno         array  of  all  block  numbers. Even those which are not active are\nprinted.\n\nagi       The AGI block is the header for inode allocation information; it is  in  the  third\n512-byte block of each allocation group.  Fields defined:\nmagicnum    AGI block magic number, 0x58414749 ('XAGI').\nversionnum  version number, currently 1.\nseqno       sequence number starting from 0.\nlength      size in filesystem blocks of the allocation group.\ncount       count of inodes allocated.\nroot        block  number of the root of the Btree holding inode allocation in‐\nformation.\nlevel       number of levels in the inode allocation Btree.\nfreecount   count of allocated inodes that are not in use.\nnewino      last inode number allocated.\ndirino      unused.\nunlinked    an array of inode numbers within the allocation group. The  entries\nin the AGI block are the heads of lists which run through the inode\nnextunlinked  field. These inodes are to be unlinked the next time\nthe filesystem is mounted.\n\nattr      An attribute fork is organized as a Btree with the actual data embedded in the leaf\nblocks. The root of the Btree is found in block 0 of the fork.  The index (sort or‐\nder) of the Btree is the hash value of the attribute name.  All the blocks  contain\na  blkinfo  structure  at  the  beginning,  see type dir for a description. Nonleaf\nblocks are identical in format to those for version 1 and  version  2  directories,\nsee  type  dir  for a description. Leaf blocks can refer to \"local\" or \"remote\" at‐\ntribute values. Local values are stored directly in the leaf  block.   Leaf  blocks\ncontain the following fields:\nhdr         header containing a blkinfo structure info (magic number 0xfbee), a\ncount of active entries, usedbytes total bytes of names and values,\nthe  firstused  byte in the name area, holes set if the block needs\ncompaction, and array freemap as for dir leaf blocks.\nentries     array of structures containing a hashval, nameidx (index  into  the\nblock of the name), and flags incomplete, root, and local.\nnvlist      array  of  structures  describing  the  attribute names and values.\nFields always present: valuelen (length of value in  bytes),  name‐\nlen,  and  name.   Fields  present  for  local values: value (value\nstring). Fields present for remote  values:  valueblk  (fork  block\nnumber of containing the value).\n\nRemote  values  are stored in an independent block in the attribute fork.  Prior to\nv5, value blocks had no structure, but in v5 they acquired a header structure  with\nthe following fields:\nmagic       attr3 remote block magic number, 0x5841524d ('XARM').\noffset      Byte offset of this data block within the overall attribute value.\nbytes       Number of bytes stored in this block.\ncrc         Checksum of the attribute block contents.\nuuid        Filesystem UUID.\nowner       Inode that owns this attribute value.\nbno         Block offset of this block within the inode's attribute fork.\nlsn         Log serial number of the last time this block was logged.\ndata        The attribute value data.\n\nbmapbt    Files  with  many extents in their data or attribute fork will have the extents de‐\nscribed by the contents of a Btree for that fork, instead of being stored  directly\nin the inode.  Each bmap Btree starts with a root block contained within the inode.\nThe  other  levels  of  the  Btree are stored in filesystem blocks.  The blocks are\nlinked to sibling left and right blocks at each level, as well as by pointers  from\nparent to child blocks.  Each block contains the following fields:\nmagic       bmap Btree block magic number, 0x424d4150 ('BMAP').\nlevel       level of this block above the leaf level.\nnumrecs     number of records or keys in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf  blocks  only] array of extent records.  Each record contains\nstartoff, startblock, blockcount, and extentflag (1 if  the  extent\nis unwritten).\nkeys        [non-leaf  blocks  only]  array of key records. These are the first\nkey value of each block in the level below this  one.  Each  record\ncontains startoff.\nptrs        [non-leaf blocks only] array of child block pointers.  Each pointer\nis a filesystem block number to the next level in the Btree.\n\nbnobt     There  is one set of filesystem blocks forming the by-block-number allocation Btree\nfor each allocation group. The root block of this Btree is designated by  the  bno‐\nroot  field  in the corresponding AGF block.  The blocks are linked to sibling left\nand right blocks at each level, as well as by pointers from parent to child blocks.\nEach block has the following fields:\nmagic       BNOBT block magic number, 0x41425442 ('ABTB').\nlevel       level number of this block, 0 is a leaf.\nnumrecs     number of data entries in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf blocks only] array of freespace records. Each record contains\nstartblock and blockcount.\nkeys        [non-leaf blocks only] array of key records. These  are  the  first\nvalue  of  each block in the level below this one. Each record con‐\ntains startblock and blockcount.\nptrs        [non-leaf blocks only] array of child block pointers. Each  pointer\nis  a block number within the allocation group to the next level in\nthe Btree.\n\ncntbt     There is one set of filesystem blocks forming the by-block-count  allocation  Btree\nfor  each  allocation group. The root block of this Btree is designated by the cnt‐\nroot field in the corresponding AGF block. The blocks are linked  to  sibling  left\nand right blocks at each level, as well as by pointers from parent to child blocks.\nEach block has the following fields:\nmagic       CNTBT block magic number, 0x41425443 ('ABTC').\nlevel       level number of this block, 0 is a leaf.\nnumrecs     number of data entries in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf blocks only] array of freespace records. Each record contains\nstartblock and blockcount.\nkeys        [non-leaf  blocks  only]  array of key records. These are the first\nvalue of each block in the level below this one. Each  record  con‐\ntains blockcount and startblock.\nptrs        [non-leaf  blocks only] array of child block pointers. Each pointer\nis a block number within the allocation group to the next level  in\nthe Btree.\n\ndata      User  file  blocks, and other blocks whose type is unknown, have this type for dis‐\nplay purposes in xfsdb.  The block data is displayed in hexadecimal format.\n\ndir       A version 1 directory is organized as a Btree with the directory data  embedded  in\nthe  leaf  blocks. The root of the Btree is found in block 0 of the file. The index\n(sort order) of the Btree is the hash value of the entry name. All the blocks  con‐\ntain a blkinfo structure at the beginning with the following fields:\nforw        next sibling block.\nback        previous sibling block.\nmagic       magic number for this block type.\nThe non-leaf (node) blocks have the following fields:\nhdr         header  containing  a blkinfo structure info (magic number 0xfebe),\nthe count of active entries, and the level of this block above  the\nleaves.\nbtree       array  of  entries containing hashval and before fields. The before\nvalue is a block number within the  directory  file  to  the  child\nblock, the hashval is the last hash value in that block.\nThe leaf blocks have the following fields:\nhdr         header  containing  a blkinfo structure info (magic number 0xfeeb),\nthe count of active entries, namebytes (total name  string  bytes),\nholes  flag  (block  needs compaction), and freemap (array of base,\nsize entries for free regions).\nentries     array of structures containing hashval, nameidx  (byte  index  into\nthe block of the name string), and namelen.\nnamelist    array of structures containing inumber and name.\n\ndir2      A  version  2 directory has four kinds of blocks.  Data blocks start at offset 0 in\nthe file.  There are two kinds of data blocks: single-block  directories  have  the\nleaf  information  embedded at the end of the block, data blocks in multi-block di‐\nrectories do not.  Node and leaf blocks start at offset 32GiB (with either a single\nleaf block or the root node block).  Freespace blocks start at offset  64GiB.   The\nnode  and leaf blocks form a Btree, with references to the data in the data blocks.\nThe freespace blocks form an index of longest free spaces within the data blocks.\n\nA single-block directory block contains the following fields:\nbhdr        header containing magic number 0x58443242  ('XD2B')  and  an  array\nbestfree  of  the  longest  3  free  spaces  in  the block (offset,\nlength).\nbu          array of union structures. Each element is either  an  entry  or  a\nfreespace.   For  entries, there are the following fields: inumber,\nnamelen, name, and tag.  For freespace,  there  are  the  following\nfields:  freetag  (0xffff),  length, and tag.  The tag value is the\nbyte offset in the block of the start of the entry it is  contained\nin.\nbleaf       array  of leaf entries containing hashval and address.  The address\nis a 64-bit word offset into the file.\nbtail       tail structure containing the total count of leaf entries and stale\ncount of unused leaf entries.\nA data block contains the following fields:\ndhdr        header containing magic number 0x58443244  ('XD2D')  and  an  array\nbestfree  of  the  longest  3  free  spaces  in  the block (offset,\nlength).\ndu          array of union structures as for bu.\nLeaf blocks have two possible forms. If the Btree consists of a  single  leaf  then\nthe  freespace information is in the leaf block, otherwise it is in separate blocks\nand the root of the Btree is a node block. A  leaf  block  contains  the  following\nfields:\nlhdr        header containing a blkinfo structure info (magic number 0xd2f1 for\nthe  single  leaf  case, 0xd2ff for the true Btree case), the total\ncount of leaf entries, and stale count of unused leaf entries.\nlents       leaf entries, as for bleaf.\nlbests      [single leaf only] array of  values  which  represent  the  longest\nfreespace in each data block in the directory.\nltail       [single  leaf  only]  tail  structure containing bestcount count of\nlbests.\nA node block is identical to that for types attr and dir.\n\nA freespace block contains the following fields:\nfhdr        header containing magic number 0x58443246 ('XD2F'),  firstdb  first\ndata block number covered by this freespace block, nvalid number of\nvalid  entries,  and nused number of entries representing real data\nblocks.\nfbests      array of values as for lbests.\n\ndqblk     The quota information is stored in files referred to by the superblock uquotino and\npquotino fields. Each filesystem block in a quota file contains a  constant  number\nof  quota  entries.  The  quota  entry  size is currently 136 bytes, so with a 4KiB\nfilesystem block size there are 30 quota entries per block. The  dquot  command  is\nused  to  locate  these entries in the filesystem.  The file entries are indexed by\nthe user or project identifier to determine the block and offset.  Each quota entry\nhas the following fields:\nmagic          magic number, 0x4451 ('DQ').\nversion        version number, currently 1.\nflags          flags, values include 0x01 for  user  quota,  0x02  for  project\nquota.\nid             user or project identifier.\nblkhardlimit  absolute limit on blocks in use.\nblksoftlimit  preferred limit on blocks in use.\ninohardlimit  absolute limit on inodes in use.\ninosoftlimit  preferred limit on inodes in use.\nbcount         blocks actually in use.\nicount         inodes actually in use.\nitimer         time  when service will be refused if soft limit is violated for\ninodes.\nbtimer         time when service will be refused if soft limit is violated  for\nblocks.\niwarns         number of warnings issued about inode limit violations.\nbwarns         number of warnings issued about block limit violations.\nrtbhardlimit  absolute limit on realtime blocks in use.\nrtbsoftlimit  preferred limit on realtime blocks in use.\nrtbcount       realtime blocks actually in use.\nrtbtimer       time  when service will be refused if soft limit is violated for\nrealtime blocks.\nrtbwarns       number of warnings issued about realtime block limit violations.\n\ninobt     There is one set of filesystem blocks forming the inode allocation Btree  for  each\nallocation  group.  The root block of this Btree is designated by the root field in\nthe corresponding AGI block.  The blocks are  linked  to  sibling  left  and  right\nblocks  at  each  level,  as well as by pointers from parent to child blocks.  Each\nblock has the following fields:\nmagic       INOBT block magic number, 0x49414254 ('IABT').\nlevel       level number of this block, 0 is a leaf.\nnumrecs     number of data entries in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf blocks only] array of inode  records.  Each  record  contains\nstartino allocation-group relative inode number, freecount count of\nfree  inodes in this chunk, and free bitmap, LSB corresponds to in‐\node 0.\nkeys        [non-leaf blocks only] array of key records. These  are  the  first\nvalue  of  each block in the level below this one. Each record con‐\ntains startino.\nptrs        [non-leaf blocks only] array of child block pointers. Each  pointer\nis  a block number within the allocation group to the next level in\nthe Btree.\n\ninode     Inodes are allocated in \"chunks\" of 64 inodes each. Usually  a  chunk  is  multiple\nfilesystem  blocks,  although  there are cases with large filesystem blocks where a\nchunk is less than one block. The inode Btree (see inobt above) refers to the inode\nnumbers per allocation group. The inode numbers directly reflect  the  location  of\nthe inode block on disk. Use the inode command to point xfsdb to a specific inode.\nEach inode contains four regions: core, nextunlinked, u, and a.  core contains the\nfixed information.  nextunlinked is separated from the core due to journaling con‐\nsiderations, see type agi field unlinked.  u is a union structure that is different\nin size and format depending on the type and representation of the file data (\"data\nfork\").   a is an optional union structure to describe attribute data, that is dif‐\nferent in size, format, and location depending on the presence  and  representation\nof attribute data, and the size of the u data (\"attribute fork\").  xfsdb automati‐\ncally selects the proper union members based on information in the inode.\n\nThe following are fields in the inode core:\nmagic       inode magic number, 0x494e ('IN').\nmode        mode  and  type  of  file,  as described in chmod(2), mknod(2), and\nstat(2).\nversion     inode version, 1 or 2.\nformat      format of u union data (0: xfsdevt, 1: local file - in-inode  di‐\nrectory  or  symlink,  2:  extent list, 3: Btree root, 4: unique id\n[unused]).\nnlinkv1     number of links to the file in a version 1 inode.\nnlinkv2     number of links to the file in a version 2 inode.\nprojidlo   owner's project id (low word; version  2  inode  only).   projidhi\nowner's project id (high word; version 2 inode only).\nuid         owner's user id.\ngid         owner's group id.\natime       time last accessed (seconds and nanoseconds).\nmtime       time last modified.\nctime       time created or inode last modified.\nsize        number of bytes in the file.\nnblocks     total  number  of  blocks  in  the  file including indirect and at‐\ntribute.\nextsize     basic/minimum extent size for the file.\nnextents    number of extents in the data fork.\nnaextents   number of extents in the attribute fork.\nforkoff     attribute fork offset in the inode, in 64-bit words from the  start\nof u.\naformat     format of a data (1: local attribute data, 2: extent list, 3: Btree\nroot).\ndmevmask    DMAPI event mask.\ndmstate     DMAPI state information.\nnewrtbm     file is the realtime bitmap and is \"new\" format.\nprealloc    file has preallocated data space after EOF.\nrealtime    file data is in the realtime subvolume.\ngen         inode generation number.\nThe following fields are in the u data fork union:\nbmbt        bmap Btree root. This looks like a bmapbtd block with redundant in‐\nformation removed.\nbmx         array of extent descriptors.\ndev         devt for the block or character device.\nsfdir       shortform  (in-inode)  version  1 directory. This consists of a hdr\ncontaining the parent inode number and a count of active entries in\nthe directory, followed by an array list of hdr.count entries. Each\nsuch entry contains inumber, namelen, and name string.\nsfdir2      shortform (in-inode) version 2 directory. This consists  of  a  hdr\ncontaining  a  count of active entries in the directory, an i8count\nof entries with inumbers that don't fit in a 32-bit value, and  the\nparent  inode  number,  followed  by an array list of hdr.count en‐\ntries. Each such entry contains namelen, a saved offset  used  when\nthe directory is converted to a larger form, a name string, and the\ninumber.\nsymlink     symbolic link string value.\nThe following fields are in the a attribute fork union if it exists:\nbmbt        bmap Btree root, as above.\nbmx         array of extent descriptors.\nsfattr      shortform  (in-inode) attribute values. This consists of a hdr con‐\ntaining a totsize (total size in bytes) and a count of  active  en‐\ntries,  followed  by  an array list of hdr.count entries. Each such\nentry contains namelen, valuelen, root flag, name, and value.\n\nlog       Log blocks contain the journal entries for XFS.  It's not useful to  examine  these\nwith xfsdb, use xfslogprint(8) instead.\n\nrefcntbt  There  is  one  set of filesystem blocks forming the reference count Btree for each\nallocation group. The root block of this Btree  is  designated  by  the  refcntroot\nfield  in  the  corresponding AGF block.  The blocks are linked to sibling left and\nright blocks at each level, as well as by pointers from  parent  to  child  blocks.\nEach block has the following fields:\nmagic       REFC block magic number, 0x52334643 ('R3FC').\nlevel       level number of this block, 0 is a leaf.\nnumrecs     number of data entries in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf  blocks  only]  array of reference count records. Each record\ncontains startblock, blockcount, and refcount.\nkeys        [non-leaf blocks only] array of key records. These  are  the  first\nvalue  of  each block in the level below this one. Each record con‐\ntains startblock.\nptrs        [non-leaf blocks only] array of child block pointers. Each  pointer\nis  a block number within the allocation group to the next level in\nthe Btree.\n\nrmapbt    There is one set of filesystem blocks forming the reverse mapping  Btree  for  each\nallocation  group. The root block of this Btree is designated by the rmaproot field\nin the corresponding AGF block.  The blocks are linked to sibling  left  and  right\nblocks  at  each  level,  as well as by pointers from parent to child blocks.  Each\nblock has the following fields:\nmagic       RMAP block magic number, 0x524d4233 ('RMB3').\nlevel       level number of this block, 0 is a leaf.\nnumrecs     number of data entries in the block.\nleftsib     left (logically lower) sibling block, 0 if none.\nrightsib    right (logically higher) sibling block, 0 if none.\nrecs        [leaf blocks only] array of reference count  records.  Each  record\ncontains   startblock,   blockcount,   owner,   offset,  attrfork,\nbmbtblock, and unwritten.\nkeys        [non-leaf blocks only]  array  of  double-key  records.  The  first\n(\"low\") key contains the first value of each block in the level be‐\nlow this one. The second (\"high\") key contains the largest key that\ncan be used to identify any record in the subtree. Each record con‐\ntains startblock, owner, offset, attrfork, and bmbtblock.\nptrs        [non-leaf  blocks only] array of child block pointers. Each pointer\nis a block number within the allocation group to the next level  in\nthe Btree.\n\nrtbitmap  If the filesystem has a realtime subvolume, then the rbmino field in the superblock\nrefers  to  a  file that contains the realtime bitmap.  Each bit in the bitmap file\ncontrols the allocation of a single realtime extent (set == free).  The  bitmap  is\nprocessed  in  32-bit  words,  the  LSB of a word is used for the first extent con‐\ntrolled by that bitmap word. The atime field of the realtime bitmap inode  contains\na counter that is used to control where the next new realtime file will start.\n\nrtsummary If  the  filesystem  has  a  realtime  subvolume, then the rsumino field in the su‐\nperblock refers to a file that contains the realtime summary data. The summary file\ncontains a two-dimensional array of 16-bit values.  Each value counts the number of\nfree extent runs (consecutive free realtime extents) of a given range of sizes that\nstarts in a given bitmap block.  The size ranges are binary buckets  (low  size  in\nthe  bucket is a power of 2).  There are as many size ranges as are necessary given\nthe size of the realtime subvolume.  The first dimension is  the  size  range,  the\nsecond  dimension is the starting bitmap block number (adjacent entries are for the\nsame size, adjacent bitmap blocks).\n\nsb        There is one sb (superblock) structure per allocation group.  It is the first  disk\nblock  in  the allocation group.  Only the first one (block 0 of the filesystem) is\nactually used; the other blocks are redundant information for xfsrepair(8) to  use\nif the first superblock is damaged. Fields defined:\nmagicnum    superblock magic number, 0x58465342 ('XFSB').\nblocksize   filesystem block size in bytes.\ndblocks     number of filesystem blocks present in the data subvolume.\nrblocks     number of filesystem blocks present in the realtime subvolume.\nrextents    number of realtime extents that rblocks contain.\nuuid        unique identifier of the filesystem.\nlogstart    starting  filesystem  block  number  of the log (journal).  If this\nvalue is 0 the log is \"external\".\nrootino     root inode number.\nrbmino      realtime bitmap inode number.\nrsumino     realtime summary data inode number.\nrextsize    realtime extent size in filesystem blocks.\nagblocks    size of an allocation group in filesystem blocks.\nagcount     number of allocation groups.\nrbmblocks   number of realtime bitmap blocks.\nlogblocks   number of log blocks (filesystem blocks).\nversionnum  filesystem version information.  This value is currently 1,  2,  3,\nor  4 in the low 4 bits.  If the low bits are 4 then the other bits\nhave additional meanings.  1 is the original value.  2  means  that\nattributes  were  used.   3 means that version 2 inodes (large link\ncounts) were used.  4 is the bitmask version of the version number.\nIn this case, the other bits are used as flags (0x0010:  attributes\nwere  used, 0x0020: version 2 inodes were used, 0x0040: quotas were\nused, 0x0080: inode cluster alignment is  in  force,  0x0100:  data\nstripe  alignment is in force, 0x0200: the sharedvn field is used,\n0x1000: unwritten extent tracking is on, 0x2000: version 2 directo‐\nries are in use).\nsectsize    sector size in bytes, currently always 512.  This is  the  size  of\nthe superblock and the other header blocks.\ninodesize   inode size in bytes.\ninopblock   number of inodes per filesystem block.\nfname       obsolete, filesystem name.\nfpack       obsolete, filesystem pack name.\nblocklog    log2 of blocksize.\nsectlog     log2 of sectsize.\ninodelog    log2 of inodesize.\ninopblog    log2 of inopblock.\nagblklog    log2 of agblocks (rounded up).\nrextslog    log2 of rextents.\ninprogress  mkfs.xfs(8)  or xfscopy(8) aborted before completing this filesys‐\ntem.\nimaxpct    maximum percentage of filesystem space used for inode blocks.\nicount      number of allocated inodes.\nifree       number of allocated inodes that are not in use.\nfdblocks    number of free data blocks.\nfrextents   number of free realtime extents.\nuquotino    user quota inode number.\npquotino    project quota inode number; this is currently unused.\nqflags      quota status flags (0x01: user quota accounting is on,  0x02:  user\nquota  limits  are  enforced, 0x04: quotacheck has been run on user\nquotas, 0x08: project quota accounting is on, 0x10:  project  quota\nlimits  are enforced, 0x20: quotacheck has been run on project quo‐\ntas).\nflags       random flags. 0x01: only read-only mounts are allowed.\nsharedvn   shared version number (shared readonly filesystems).\ninoalignmt  inode chunk alignment in filesystem blocks.\nunit        stripe or RAID unit.\nwidth       stripe or RAID width.\ndirblklog   log2 of directory block size (filesystem blocks).\n\nsymlink   Symbolic link blocks are used only when the symbolic link value does not fit inside\nthe inode. The block content is just the string value.  Bytes past the logical  end\nof the symbolic link value have arbitrary values.\n\ntext      User  file  blocks, and other blocks whose type is unknown, have this type for dis‐\nplay purposes in xfsdb.  The block data is displayed in two  columns:  Hexadecimal\nformat and printable ASCII chars.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Many  messages  can  come from the check (blockget) command.  If the filesystem is completely\ncorrupt, a core dump might be produced instead of the message\ndevice is not a valid filesystem\n\nIf the filesystem is very large (has many files) then check might run out of memory. In  this\ncase the message\nout of memory\nis printed.\n\nThe following is a description of the most likely problems and the associated messages.  Most\nof the diagnostics produced are only meaningful with an understanding of the structure of the\nfilesystem.\n\nagffreeblks n, counted m in ag a\nThe  freeblocks  count  in  the allocation group header for allocation group a doesn't\nmatch the number of blocks counted free.\n\nagflongest n, counted m in ag a\nThe longest free extent in the allocation group header for allocation group a  doesn't\nmatch the longest free extent found in the allocation group.\n\nagicount n, counted m in ag a\nThe  allocated  inode  count  in  the  allocation  group header for allocation group a\ndoesn't match the number of inodes counted in the allocation group.\n\nagifreecount n, counted m in ag a\nThe free inode count in the allocation group header for  allocation  group  a  doesn't\nmatch the number of inodes counted free in the allocation group.\n\nblock a/b expected inum 0 got i\nThe block number is specified as a pair (allocation group number, block in the alloca‐\ntion  group).   The  block  is  used multiple times (shared), between multiple inodes.\nThis message usually follows a message of the next type.\n\nblock a/b expected type unknown got y\nThe block is used multiple times (shared).\n\nblock a/b type unknown not expected\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "mkfs.xfs(8),  xfsadmin(8),  xfscopy(8),  xfslogprint(8),  xfsmetadump(8),  xfsncheck(8),\nxfsrepair(8), mount(8), chmod(2), mknod(2), stat(2), xfs(5).\n\nxfsdb(8)",
            "subsections": []
        }
    },
    "summary": "xfsdb - debug an XFS filesystem",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "line. Multiple -c arguments may be given. The commands are run in the sequence given, then the program exits."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "vice (see the mkfs.xfs(8) -d file option). This might happen if an image copy of a filesystem has been made into an ordinary file with xfscopy(8)."
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "use in xfsmetadump."
        },
        {
            "flag": "-i",
            "long": null,
            "arg": null,
            "description": "for shell scripts which must only operate on filesystems in a guaranteed consistent state (either unmounted or mounted read-only). These semantics are slightly different to that of the -r option."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "Specifies the device where the filesystems external log resides. Only for those filesystems which use an external log. See the mkfs.xfs(8) -l option, and refer to xfs(5) for a detailed description of the XFS log."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "Set the program name to progname for prompts and some error messages, the default value is xfsdb."
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "mounted. It is only necessary to omit this flag if a command that changes data (write, blocktrash, crc) is to be used."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "date) commands."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "mkfs.xfs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mkfs.xfs/8/json"
        },
        {
            "name": "xfsadmin",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsadmin/8/json"
        },
        {
            "name": "xfscopy",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfscopy/8/json"
        },
        {
            "name": "xfslogprint",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfslogprint/8/json"
        },
        {
            "name": "xfsmetadump",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsmetadump/8/json"
        },
        {
            "name": "xfsncheck",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsncheck/8/json"
        },
        {
            "name": "xfsrepair",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsrepair/8/json"
        },
        {
            "name": "mount",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
        },
        {
            "name": "chmod",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/chmod/2/json"
        },
        {
            "name": "mknod",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/mknod/2/json"
        },
        {
            "name": "stat",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/stat/2/json"
        },
        {
            "name": "xfs",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/xfs/5/json"
        },
        {
            "name": "xfsdb",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsdb/8/json"
        }
    ]
}