1xfs_db(8)                   System Manager's Manual                  xfs_db(8)
2
3
4

NAME

6       xfs_db - debug an XFS filesystem
7

SYNOPSIS

9       xfs_db [ -c cmd ] ... [ -i|r|x|F ] [ -f ] [ -l logdev ] [ -p progname ]
10       device
11       xfs_db -V
12

DESCRIPTION

14       xfs_db is used to examine an XFS filesystem. Under  rare  circumstances
15       it  can also be used to modify an XFS filesystem, but that task is nor‐
16       mally left to xfs_repair(8) or to scripts such as xfs_admin(8) that run
17       xfs_db.
18

OPTIONS

20       -c cmd xfs_db commands may be run interactively (the default) or as ar‐
21              guments on the command line. Multiple -c arguments may be given.
22              The commands are run in the sequence given, then the program ex‐
23              its.
24
25       -f     Specifies that the filesystem image to be processed is stored in
26              a  regular  file at device (see the mkfs.xfs(8) -d file option).
27              This might happen if an image copy of a filesystem has been made
28              into an ordinary file with xfs_copy(8).
29
30       -F     Specifies  that we want to continue even if the superblock magic
31              is not correct.  For use in xfs_metadump.
32
33       -i     Allows execution on a mounted filesystem, provided it is mounted
34              read-only.   Useful for shell scripts which must only operate on
35              filesystems in a guaranteed consistent state  (either  unmounted
36              or mounted read-only). These semantics are slightly different to
37              that of the -r option.
38
39       -l logdev
40              Specifies the device where the filesystems external log resides.
41              Only  for  those  filesystems which use an external log. See the
42              mkfs.xfs(8) -l option, and refer to xfs(5) for  a  detailed  de‐
43              scription of the XFS log.
44
45       -p progname
46              Set the program name to progname for prompts and some error mes‐
47              sages, the default value is xfs_db.
48
49       -r     Open device or filename read-only. This option  is  required  if
50              the  filesystem  is  mounted.  It is only necessary to omit this
51              flag if a command that changes data (write, blocktrash, crc)  is
52              to be used.
53
54       -x     Specifies expert mode.  This enables the (write, blocktrash, crc
55              invalidate/revalidate) commands.
56
57       -V     Prints the version number and exits.
58

CONCEPTS

60       xfs_db commands can be broken up into two classes.  Most  commands  are
61       for  the  navigation  and display of data structures in the filesystem.
62       Other commands are for scanning the filesystem in some way.
63
64       Commands which are used to navigate the filesystem structure take argu‐
65       ments  which  reflect  the names of filesystem structure fields.  There
66       can be multiple field names  separated  by  dots  when  the  underlying
67       structures  are nested, as in C.  The field names can be indexed (as an
68       array index) if the underlying field is an array.   The  array  indices
69       can be specified as a range, two numbers separated by a dash.
70
71       xfs_db  maintains a current address in the filesystem.  The granularity
72       of the address is a filesystem structure.  This  can  be  a  filesystem
73       block, an inode or quota (smaller than a filesystem block), or a direc‐
74       tory block (could be larger than a filesystem block).  There are a  va‐
75       riety of commands to set the current address.  Associated with the cur‐
76       rent address is the current data type, which is the structural type  of
77       this  data.   Commands which follow the structure of the filesystem al‐
78       ways set the type as well  as  the  address.   Commands  which  examine
79       pieces  of an individual file (inode) need the current inode to be set,
80       this is done with the inode command.
81
82       The current address/type information is actually maintained in a  stack
83       that  can  be explicitly manipulated with the push, pop, and stack com‐
84       mands.  This allows for easy examination of a nested filesystem  struc‐
85       ture.   Also,  the  last several locations visited are stored in a ring
86       buffer which can be manipulated with the forward, back, and  ring  com‐
87       mands.
88
89       XFS  filesystems  are divided into a small number of allocation groups.
90       xfs_db maintains a notion of the current allocation group which is  ma‐
91       nipulated by some commands. The initial allocation group is 0.
92

COMMANDS

94       Many commands have extensive online help. Use the help command for more
95       details on any command.
96
97       a      See the addr command.
98
99       ablock filoff
100              Set current address to the offset  filoff  (a  filesystem  block
101              number) in the attribute area of the current inode.
102
103       addr [field-expression]
104              Set  current address to the value of the field-expression.  This
105              is used to "follow" a reference in one structure to  the  object
106              being  referred to. If no argument is given, the current address
107              is printed.
108
109       agf [agno]
110              Set current address to the AGF block for allocation group  agno.
111              If no argument is given, use the current allocation group.
112
113       agfl [agno]
114              Set current address to the AGFL block for allocation group agno.
115              If no argument is given, use the current allocation group.
116
117       agi [agno]
118              Set current address to the AGI block for allocation group  agno.
119              If no argument is given, use the current allocation group.
120
121       agresv [agno]
122              Displays  the length, free block count, per-AG reservation size,
123              and per-AG reservation usage for a given AG.  If no argument  is
124              given, display information for all AGs.
125
126       attr_remove [-r|-u|-s] [-n] name
127              Remove the specified extended attribute from the current file.
128
129                 -r  Sets the attribute in the root namespace.  Only one name‐
130                     space option can be specified.
131
132                 -u  Sets the attribute in the user namespace.  Only one name‐
133                     space option can be specified.
134
135                 -s  Sets  the  attribute  in  the secure namespace.  Only one
136                     namespace option can be specified.
137
138                 -n  Do not enable 'noattr2' mode on V4 filesystems.
139
140       attr_set [-r|-u|-s] [-n] [-R|-C] [-v namelen] name
141              Sets an extended attribute on the current file  with  the  given
142              name.
143
144                 -r  Sets the attribute in the root namespace.  Only one name‐
145                     space option can be specified.
146
147                 -u  Sets the attribute in the user namespace.  Only one name‐
148                     space option can be specified.
149
150                 -s  Sets  the  attribute  in  the secure namespace.  Only one
151                     namespace option can be specified.
152
153                 -n  Do not enable 'noattr2' mode on V4 filesystems.
154
155                 -R  Replace the attribute.  The command will fail if the  at‐
156                     tribute does not already exist.
157
158                 -C  Create  the  attribute.  The command will fail if the at‐
159                     tribute already exists.
160
161                 -v  Set the attribute value to a string of this  length  con‐
162                     taining the letter 'v'.
163
164       b      See the back command.
165
166       back   Move to the previous location in the position ring.
167
168       blockfree
169              Free  block usage information collected by the last execution of
170              the blockget command. This must be done before another  blockget
171              command  can  be given, presumably with different arguments than
172              the previous one.
173
174       blockget [-npvs] [-b bno] ... [-i ino] ...
175              Get block usage and check filesystem consistency.  The  informa‐
176              tion  is  saved  for  use  by  a subsequent blockuse, ncheck, or
177              blocktrash command.
178
179                 -b  is used to specify filesystem block numbers  about  which
180                     verbose information should be printed.
181
182                 -i  is  used to specify inode numbers about which verbose in‐
183                     formation should be printed.
184
185                 -n  is used to save pathnames for  inodes  visited,  this  is
186                     used  to support the xfs_ncheck(8) command. It also means
187                     that pathnames will be printed for inodes that have prob‐
188                     lems.  This option uses a lot of memory so is not enabled
189                     by default.
190
191                 -p  causes error messages to be prefixed with the  filesystem
192                     name being processed. This is useful if several copies of
193                     xfs_db are run in parallel.
194
195                 -s  restricts output to severe errors only. This is useful if
196                     the output is too long otherwise.
197
198                 -v  enables  verbose output. Messages will be printed for ev‐
199                     ery block and inode processed.
200
201       blocktrash [-z] [-o offset] [-n count] [-x  min]  [-y  max]  [-s  seed]
202       [-0|1|2|3] [-t type] ...
203              Trash  randomly  selected  filesystem metadata blocks.  Trashing
204              occurs to randomly selected bits in  the  chosen  blocks.   This
205              command  is  available only in debugging versions of xfs_db.  It
206              is useful for testing xfs_repair(8).
207
208                 -0 | -1 | -2 | -3
209                     These are used to set the operating mode for  blocktrash.
210                     Only  one  can  be  used: -0 changed bits are cleared; -1
211                     changed bits are set; -2 changed bits  are  inverted;  -3
212                     changed bits are randomized.
213
214                 -n  supplies the count of block-trashings to perform (default
215                     1).
216
217                 -o  supplies the bit offset at which to  start  trashing  the
218                     block.   If  the value is preceded by a '+', the trashing
219                     will start at a randomly chosen  offset  that  is  larger
220                     than  the  value  supplied.   The  default is to randomly
221                     choose an offset anywhere in the block.
222
223                 -s  supplies a seed to the random processing.
224
225                 -t  gives a type of blocks to be selected for trashing.  Mul‐
226                     tiple -t options may be given. If no -t options are given
227                     then all metadata types can be trashed.
228
229                 -x  sets the minimum size of bit range to be trashed. The de‐
230                     fault value is 1.
231
232                 -y  sets the maximum size of bit range to be trashed. The de‐
233                     fault value is 1024.
234
235                 -z  trashes the block at the top of the  stack.   It  is  not
236                     necessary to run blockget if this option is supplied.
237
238       blockuse [-n] [-c count]
239              Print  usage  for  current filesystem block(s).  For each block,
240              the type and (if any) inode are printed.
241
242                 -c  specifies a count of blocks to process. The default value
243                     is 1 (the current block only).
244
245                 -n  specifies  that  file  names should be printed. The prior
246                     blockget command must have also specified the -n option.
247
248       bmap [-a] [-d] [block [len]]
249              Show the block map for the current inode.  The map  display  can
250              be  restricted to an area of the file with the block and len ar‐
251              guments. If block is given and len is omitted then 1 is  assumed
252              for len.
253
254              The  -a  and -d options are used to select the attribute or data
255              area of the inode, if neither option is given  then  both  areas
256              are shown.
257
258       btdump [-a] [-i]
259              If  the  cursor points to a btree node, dump the btree from that
260              block downward.  If instead the cursor points to an inode,  dump
261              the  data fork block mapping btree if there is one.  If the cur‐
262              sor points to a directory or extended attribute btree node, dump
263              that.  By default, only records stored in the btree are dumped.
264
265                 -a  If  the  cursor points at an inode, dump the extended at‐
266                     tribute block mapping btree, if present.
267
268                 -i  Dump all keys and pointers in intermediate  btree  nodes,
269                     and all records in leaf btree nodes.
270
271       btheight [-b blksz] [-n recs] [-w max|-w min] btree types...
272              For a given number of btree records and a btree type, report the
273              number of records and blocks for each level of  the  btree,  and
274              the  total number of blocks.  The btree type must be given after
275              the options.
276
277              A  raw  btree  geometry  can   be   provided   in   the   format
278              "record_bytes:key_bytes:ptr_bytes:header_type",            where
279              header_type is one of "short", "long", "shortcrc", or "longcrc".
280
281              The supported btree types  are:  bnobt,  cntbt,  inobt,  finobt,
282              bmapbt, refcountbt, and rmapbt.
283
284              Options are as follows:
285
286                 -b  is used to override the btree block size.  The default is
287                     the filesystem block size.
288
289                 -n  is used to specify the number of records to store.   This
290                     argument is required.
291
292                 -w max
293                     shows  only  the  best  case  scenario, which is when the
294                     btree blocks are maximally loaded.
295
296                 -w min
297                     shows only the worst case scenario,  which  is  when  the
298                     btree blocks are half full.
299
300       check  See the blockget command.
301
302       convert type number [type number] ... type
303              Convert from one address form to another.  The known types, with
304              alternate names, are:
305                 agblock or  agbno  (filesystem  block  within  an  allocation
306                        group)
307                 agino or aginode (inode number within an allocation group)
308                 agnumber or agno (allocation group number)
309                 bboff or daddroff (byte offset in a daddr)
310                 blkoff  or  fsboff or agboff (byte offset in a agblock or fs‐
311                        block)
312                 byte or fsbyte (byte address in filesystem)
313                 daddr or bb (disk address, 512-byte blocks)
314                 fsblock or fsb or fsbno (filesystem block,  see  the  fsblock
315                        command)
316                 ino or inode (inode number)
317                 inoidx or offset (index of inode in filesystem block)
318                 inooff or inodeoff (byte offset in inode)
319
320              Only  conversions  that  "make sense" are allowed.  The compound
321              form (with more than three arguments) is useful for  conversions
322              such as convert agno ag agbno agb fsblock.
323
324       crc [-i|-r|-v]
325              Invalidates,  revalidates, or validates the CRC (checksum) field
326              of the current structure, if it has one.  This command is avail‐
327              able only on CRC-enabled filesystems.  With no argument, valida‐
328              tion is performed.  Each command will display the resulting  CRC
329              value and state.
330
331                 -i  Invalidate  the structure's CRC value (incrementing it by
332                     one), and write it to disk.
333
334                 -r  Recalculate the current structure's  correct  CRC  value,
335                     and write it to disk.
336
337                 -v  Validate  and  display the current value and state of the
338                     structure's CRC.
339
340       daddr [d]
341              Set current address to the daddr (512 byte block)  given  by  d.
342              If  no value for d is given, the current address is printed, ex‐
343              pressed as a daddr.  The type is set to data (uninterpreted).
344
345       dblock filoff
346              Set current address to the offset  filoff  (a  filesystem  block
347              number) in the data area of the current inode.
348
349       debug [flagbits]
350              Set  debug option bits. These are used for debugging xfs_db.  If
351              no value is given for flagbits, print the current  debug  option
352              bits. These are for the use of the implementor.
353
354       dquot [-g|-p|-u] id
355              Set  current address to a group, project or user quota block for
356              the given ID. Defaults to user quota.
357
358       echo [arg] ...
359              Echo the arguments to the output.
360
361       f      See the forward command.
362
363       forward
364              Move forward to the next entry in the position ring.
365
366       frag [-adflqRrv]
367              Get file fragmentation data. This prints information about frag‐
368              mentation of file data in the filesystem (as opposed to fragmen‐
369              tation of freespace, for which see the  freesp  command).  Every
370              file in the filesystem is examined to see how far from ideal its
371              extent mappings are. A summary is printed giving the totals.
372
373                 -v  sets verbosity, every inode has information  printed  for
374                     it.   The  remaining  options select which inodes and ex‐
375                     tents are examined.  If no options are given then all are
376                     assumed set, otherwise just those given are enabled.
377
378                 -a  enables processing of attribute data.
379
380                 -d  enables processing of directory data.
381
382                 -f  enables processing of regular file data.
383
384                 -l  enables processing of symbolic link data.
385
386                 -q  enables processing of quota file data.
387
388                 -R  enables processing of realtime control file data.
389
390                 -r  enables processing of realtime file data.
391
392       freesp [-bcds] [-A alignment] [-a ag] ... [-e i] [-h h1] ... [-m m]
393              Summarize free space for the filesystem. The free blocks are ex‐
394              amined and totalled, and displayed in the form of  a  histogram,
395              with a count of extents in each range of free extent sizes.
396
397                 -A  reports only free extents with starting blocks aligned to
398                     alignment blocks.
399
400                 -a  adds ag to the list of allocation groups to be processed.
401                     If no -a options are given then all allocation groups are
402                     processed.
403
404                 -b  specifies that the histogram  buckets  are  binary-sized,
405                     with the starting sizes being the powers of 2.
406
407                 -c  specifies that freesp will search the by-size (cnt) space
408                     Btree instead of the default by-block (bno) space Btree.
409
410                 -d  specifies that every free extent will be displayed.
411
412                 -e  specifies that the  histogram  buckets  are  equal-sized,
413                     with the size specified as i.
414
415                 -h  specifies  a starting block number for a histogram bucket
416                     as h1.  Multiple -h's are given to specify  the  complete
417                     set of buckets.
418
419                 -m  specifies  that  the histogram starting block numbers are
420                     powers of m.  This is the general case of -b.
421
422                 -s  specifies that a final summary  of  total  free  extents,
423                     free blocks, and the average free extent size is printed.
424
425       fsb    See the fsblock command.
426
427       fsblock [fsb]
428              Set  current  address  to the fsblock value given by fsb.  If no
429              value for fsb is given the current address is printed, expressed
430              as  an  fsb.   The  type  is  set  to  data (uninterpreted). XFS
431              filesystem block numbers are computed ((agno << agshift)  |  ag‐
432              block) where agshift depends on the size of an allocation group.
433              Use the convert command to convert to and from this form.  Block
434              numbers  given  for file blocks (for instance from the bmap com‐
435              mand) are in this form.
436
437       fsmap [ start ] [ end ]
438              Prints the mapping of disk blocks used  by  an  XFS  filesystem.
439              The  map lists each extent used by files, allocation group meta‐
440              data, journalling logs, and static filesystem metadata, as  well
441              as  any  regions  that  are  unused.   All  blocks, offsets, and
442              lengths are specified in units of  512-byte  blocks,  no  matter
443              what the filesystem's block size is.  The optional start and end
444              arguments can be used to constrain the output  to  a  particular
445              range of disk blocks.
446
447       fuzz [-c] [-d] field action
448              Write  garbage  into a specific structure field on disk.  Expert
449              mode must be enabled to use this command.  The operation happens
450              immediately; there is no buffering.
451
452              The fuzz command can take the following actions against a field:
453
454                 zeroes
455                     Clears all bits in the field.
456
457                 ones
458                     Sets all bits in the field.
459
460                 firstbit
461                     Flips  the  first  bit in the field.  For a scalar value,
462                     this is the highest bit.
463
464                 middlebit
465                     Flips the middle bit in the field.
466
467                 lastbit
468                     Flips the last bit in the field.   For  a  scalar  value,
469                     this is the lowest bit.
470
471                 add Adds a small value to a scalar field.
472
473                 sub Subtracts a small value from a scalar field.
474
475                 random
476                     Randomizes the contents of the field.
477
478              The following switches affect the write behavior:
479
480                 -c  Skip  write  verifiers  and CRC recalculation; allows in‐
481                     valid data to be written to disk.
482
483                 -d  Skip write verifiers but perform CRC  recalculation;  al‐
484                     lows invalid data to be written to disk to test detection
485                     of invalid data.
486
487       hash string
488              Prints the hash value of string using the hash function  of  the
489              XFS directory and attribute implementation.
490
491       help [command]
492              Print help for one or all commands.
493
494       info   Displays  selected  geometry  information  about the filesystem.
495              The output will have the same  format  that  mkfs.xfs(8)  prints
496              when creating a filesystem or xfs_info(8) prints when querying a
497              filesystem.
498
499       inode [inode#]
500              Set the current inode number. If no inode# is given,  print  the
501              current inode number.
502
503       label [label]
504              Set  the  filesystem  label. The filesystem label can be used by
505              mount(8) instead of using a device special  file.   The  maximum
506              length  of an XFS label is 12 characters - use of a longer label
507              will result in truncation and a warning will be  issued.  If  no
508              label is given, the current filesystem label is printed.
509
510       log [stop | start filename]
511              Start  logging  output  to  filename, stop logging, or print the
512              current logging status.
513
514       logformat [-c cycle] [-s sunit]
515              Reformats the log to the specified  log  cycle  and  log  stripe
516              unit.   This  has  the effect of clearing the log destructively.
517              If the log cycle is not specified, the log is reformatted to the
518              current  cycle.   If  the  log stripe unit is not specified, the
519              stripe unit from the filesystem superblock is used.
520
521       logres Print transaction reservation size information for each transac‐
522              tion  type.   This  makes it easier to find discrepancies in the
523              reservation calculations between xfsprogs and the kernel,  which
524              will help when diagnosing minimum log size calculation errors.
525
526       metadump [-egow] filename
527              Dumps  metadata to a file. See xfs_metadump(8) for more informa‐
528              tion.
529
530       ncheck [-s] [-i ino] ...
531              Print name-inode pairs. A blockget -n command must be run  first
532              to gather the information.
533
534                 -i  specifies an inode number to be printed. If no -i options
535                     are given then all inodes are printed.
536
537                 -s  specifies that only setuid and setgid files are printed.
538
539       p      See the print command.
540
541       pop    Pop location from the stack.
542
543       print [field-expression] ...
544              Print field values.  If no argument is given, print  all  fields
545              in the current structure.
546
547       push [command]
548              Push location to the stack. If command is supplied, set the cur‐
549              rent location to the results of command after  pushing  the  old
550              location.
551
552       q      See the quit command.
553
554       quit   Exit xfs_db.
555
556       ring [index]
557              Show position ring (if no index argument is given), or move to a
558              specific entry in the position ring given by index.
559
560       sb [agno]
561              Set current address to SB header in allocation group  agno.   If
562              no agno is given, use the current allocation group number.
563
564       source source-file
565              Process  commands  from  source-file.   source  commands  can be
566              nested.
567
568       stack  View the location stack.
569
570       type [type]
571              Set the current data type to type.  If  no  argument  is  given,
572              show  the  current data type.  The possible data types are: agf,
573              agfl, agi, attr, bmapbta,  bmapbtd,  bnobt,  cntbt,  data,  dir,
574              dir2,  dqblk, inobt, inode, log, refcntbt, rmapbt, rtbitmap, rt‐
575              summary, sb, symlink and text.  See the TYPES section below  for
576              more information on these data types.
577
578       timelimit [OPTIONS]
579              Print  the  minimum and maximum supported values for inode time‐
580              stamps, quota expiration timers, and quota  grace  periods  sup‐
581              ported by this filesystem.  Options include:
582
583                 --bigtime
584                     Print  the time limits of an XFS filesystem with the big‐
585                     time feature enabled.
586
587                 --classic
588                     Print the time limits of a classic XFS filesystem.
589
590                 --compact
591                     Print all limits as raw values on a single line.
592
593                 --pretty
594                     Print the timestamps in the  current  locale's  date  and
595                     time format instead of raw seconds since the Unix epoch.
596
597       uuid [uuid | generate | rewrite | restore]
598              Set  the  filesystem  universally unique identifier (UUID).  The
599              filesystem UUID can be used by mount(8) instead of using  a  de‐
600              vice  special file.  The uuid can be set directly to the desired
601              UUID, or it can be automatically generated  using  the  generate
602              option.  These  options will both write the UUID into every copy
603              of the superblock in the filesystem.  On a CRC-enabled  filesys‐
604              tem,  this  will  set  an  incompatible superblock flag, and the
605              filesystem will not be mountable with older kernels.   This  can
606              be  reverted with the restore option, which will copy the origi‐
607              nal UUID back into place and  clear  the  incompatible  flag  as
608              needed.   rewrite  copies  the current UUID from the primary su‐
609              perblock to all secondary copies of the superblock.  If no argu‐
610              ment is given, the current filesystem UUID is printed.
611
612       version [feature | versionnum features2]
613              Enable  selected features for a filesystem (certain features can
614              be enabled on an unmounted  filesystem,  after  mkfs.xfs(8)  has
615              created  the  filesystem).  Support for unwritten extents can be
616              enabled using the extflg option. Support for version 2 log  for‐
617              mat  can  be enabled using the log2 option. Support for extended
618              attributes can be enabled using the attr1 or attr2 option.  Once
619              enabled,  extended  attributes  cannot be disabled, but the user
620              may toggle between attr1 and attr2 at will  (older  kernels  may
621              not support the newer version).
622
623              If  no  argument  is given, the current version and feature bits
624              are printed.  With one argument, this command will write the up‐
625              dated  version  number  into every copy of the superblock in the
626              filesystem.  If two arguments are given, they will  be  used  as
627              numeric  values  for  the  versionnum and features2 bits respec‐
628              tively, and their string equivalent reported (but  no  modifica‐
629              tions are made).
630
631       write [-c|-d] [field value] ...
632              Write a value to disk.  Specific fields can be set in structures
633              (struct mode), or a block can be set to data values (data mode),
634              or a block can be set to string values (string mode, for symlink
635              blocks).  The operation happens immediately: there is no buffer‐
636              ing.
637
638              Struct  mode  is  in effect when the current type is structural,
639              i.e. not data. For struct  mode,  the  syntax  is  "write  field
640              value".
641
642              Data  mode  is  in effect when the current type is data. In this
643              case the contents of the block can be shifted or rotated left or
644              right,  or filled with a sequence, a constant value, or a random
645              value. In this mode write with no arguments gives more  informa‐
646              tion on the allowed commands.
647
648                 -c  Skip  write  verifiers  and CRC recalculation; allows in‐
649                     valid data to be written to disk.
650
651                 -d  Skip write verifiers but perform CRC recalculation.  This
652                     allows  invalid data to be written to disk to test detec‐
653                     tion of invalid data.  (This is  not  possible  for  some
654                     types.)
655

TYPES

657       This  section  gives  the fields in each structure type and their mean‐
658       ings.  Note that some types of block cover multiple actual  structures,
659       for instance directory blocks.
660
661       agf       The AGF block is the header for block allocation information;
662                 it is in the second 512-byte block of each allocation  group.
663                 The following fields are defined:
664                     magicnum    AGF block magic number, 0x58414746 ('XAGF').
665                     versionnum  version number, currently 1.
666                     seqno       sequence number starting from 0.
667                     length      size  in  filesystem blocks of the allocation
668                                 group. All allocation groups except the  last
669                                 one  of  the filesystem have the superblock's
670                                 agblocks value here.
671                     bnoroot     block number of the root of the Btree holding
672                                 free  space  information sorted by block num‐
673                                 ber.
674                     cntroot     block number of the root of the Btree holding
675                                 free space information sorted by block count.
676                     bnolevel    number   of  levels  in  the  by-block-number
677                                 Btree.
678                     cntlevel    number of levels in the by-block-count Btree.
679                     flfirst     index into the AGFL block of the first active
680                                 entry.
681                     fllast      index  into the AGFL block of the last active
682                                 entry.
683                     flcount     count of active entries in the AGFL block.
684                     freeblks    count of blocks represented in the  freespace
685                                 Btrees.
686                     longest     longest   free   space   represented  in  the
687                                 freespace Btrees.
688                     btreeblks   number of blocks held in the AGF Btrees.
689
690       agfl      The AGFL block contains block numbers for use  of  the  block
691                 allocator; it is in the fourth 512-byte block of each alloca‐
692                 tion group.  Each entry in the active list is a block  number
693                 within  the allocation group that can be used for any purpose
694                 if space runs low.  The AGF block fields flfirst, fllast, and
695                 flcount  designate which entries are currently active.  Entry
696                 space is allocated in  a  circular  manner  within  the  AGFL
697                 block.  Fields defined:
698                     bno         array  of all block numbers. Even those which
699                                 are not active are printed.
700
701       agi       The AGI block is the header for inode allocation information;
702                 it  is  in the third 512-byte block of each allocation group.
703                 Fields defined:
704                     magicnum    AGI block magic number, 0x58414749 ('XAGI').
705                     versionnum  version number, currently 1.
706                     seqno       sequence number starting from 0.
707                     length      size in filesystem blocks of  the  allocation
708                                 group.
709                     count       count of inodes allocated.
710                     root        block number of the root of the Btree holding
711                                 inode allocation information.
712                     level       number of  levels  in  the  inode  allocation
713                                 Btree.
714                     freecount   count  of  allocated  inodes  that are not in
715                                 use.
716                     newino      last inode number allocated.
717                     dirino      unused.
718                     unlinked    an array of inode numbers within the  alloca‐
719                                 tion  group. The entries in the AGI block are
720                                 the heads of lists which run through the  in‐
721                                 ode  next_unlinked field. These inodes are to
722                                 be unlinked the next time the  filesystem  is
723                                 mounted.
724
725       attr      An  attribute  fork  is  organized as a Btree with the actual
726                 data embedded in the leaf blocks. The root of  the  Btree  is
727                 found  in block 0 of the fork.  The index (sort order) of the
728                 Btree is the hash value  of  the  attribute  name.   All  the
729                 blocks contain a blkinfo structure at the beginning, see type
730                 dir for a description. Nonleaf blocks are identical in format
731                 to  those  for  version 1 and version 2 directories, see type
732                 dir for a description. Leaf blocks can refer  to  "local"  or
733                 "remote"  attribute  values. Local values are stored directly
734                 in the leaf block.  Leaf blocks contain the following fields:
735                     hdr         header containing a  blkinfo  structure  info
736                                 (magic  number 0xfbee), a count of active en‐
737                                 tries, usedbytes total  bytes  of  names  and
738                                 values,  the firstused byte in the name area,
739                                 holes set if the block needs compaction,  and
740                                 array freemap as for dir leaf blocks.
741                     entries     array  of  structures  containing  a hashval,
742                                 nameidx (index into the block of  the  name),
743                                 and flags incomplete, root, and local.
744                     nvlist      array  of structures describing the attribute
745                                 names and values. Fields always present: val‐
746                                 uelen  (length  of  value in bytes), namelen,
747                                 and name.  Fields present for  local  values:
748                                 value  (value string). Fields present for re‐
749                                 mote values: valueblk (fork block  number  of
750                                 containing the value).
751
752                 Remote  values  are stored in an independent block in the at‐
753                 tribute fork.  Prior to v5, value blocks  had  no  structure,
754                 but in v5 they acquired a header structure with the following
755                 fields:
756                     magic       attr3 remote block magic  number,  0x5841524d
757                                 ('XARM').
758                     offset      Byte  offset  of  this  data block within the
759                                 overall attribute value.
760                     bytes       Number of bytes stored in this block.
761                     crc         Checksum of the attribute block contents.
762                     uuid        Filesystem UUID.
763                     owner       Inode that owns this attribute value.
764                     bno         Block offset of this block within the inode's
765                                 attribute fork.
766                     lsn         Log serial number of the last time this block
767                                 was logged.
768                     data        The attribute value data.
769
770       bmapbt    Files with many extents in their data or attribute fork  will
771                 have  the  extents  described  by the contents of a Btree for
772                 that fork, instead of being stored  directly  in  the  inode.
773                 Each bmap Btree starts with a root block contained within the
774                 inode.  The other levels of the Btree are stored in  filesys‐
775                 tem  blocks.  The blocks are linked to sibling left and right
776                 blocks at each level, as well as by pointers from  parent  to
777                 child blocks.  Each block contains the following fields:
778                     magic       bmap  Btree  block  magic  number, 0x424d4150
779                                 ('BMAP').
780                     level       level of this block above the leaf level.
781                     numrecs     number of records or keys in the block.
782                     leftsib     left (logically lower) sibling  block,  0  if
783                                 none.
784                     rightsib    right  (logically higher) sibling block, 0 if
785                                 none.
786                     recs        [leaf blocks only] array of  extent  records.
787                                 Each  record  contains  startoff, startblock,
788                                 blockcount, and extentflag (1 if  the  extent
789                                 is unwritten).
790                     keys        [non-leaf  blocks only] array of key records.
791                                 These are the first key value of  each  block
792                                 in the level below this one. Each record con‐
793                                 tains startoff.
794                     ptrs        [non-leaf blocks only] array of  child  block
795                                 pointers.  Each pointer is a filesystem block
796                                 number to the next level in the Btree.
797
798       bnobt     There is one set of filesystem blocks forming  the  by-block-
799                 number  allocation  Btree for each allocation group. The root
800                 block of this Btree is designated by the bnoroot field in the
801                 corresponding  AGF  block.   The blocks are linked to sibling
802                 left and right blocks at each level, as well as  by  pointers
803                 from  parent  to  child blocks.  Each block has the following
804                 fields:
805                     magic       BNOBT   block   magic   number,    0x41425442
806                                 ('ABTB').
807                     level       level number of this block, 0 is a leaf.
808                     numrecs     number of data entries in the block.
809                     leftsib     left  (logically  lower)  sibling block, 0 if
810                                 none.
811                     rightsib    right (logically higher) sibling block, 0  if
812                                 none.
813                     recs        [leaf   blocks   only]   array  of  freespace
814                                 records. Each record contains startblock  and
815                                 blockcount.
816                     keys        [non-leaf  blocks only] array of key records.
817                                 These are the first value of  each  block  in
818                                 the  level  below  this one. Each record con‐
819                                 tains startblock and blockcount.
820                     ptrs        [non-leaf blocks only] array of  child  block
821                                 pointers.  Each  pointer  is  a  block number
822                                 within the allocation group to the next level
823                                 in the Btree.
824
825       cntbt     There  is  one set of filesystem blocks forming the by-block-
826                 count allocation Btree for each allocation  group.  The  root
827                 block of this Btree is designated by the cntroot field in the
828                 corresponding AGF block. The blocks  are  linked  to  sibling
829                 left  and  right blocks at each level, as well as by pointers
830                 from parent to child blocks. Each  block  has  the  following
831                 fields:
832                     magic       CNTBT    block   magic   number,   0x41425443
833                                 ('ABTC').
834                     level       level number of this block, 0 is a leaf.
835                     numrecs     number of data entries in the block.
836                     leftsib     left (logically lower) sibling  block,  0  if
837                                 none.
838                     rightsib    right  (logically higher) sibling block, 0 if
839                                 none.
840                     recs        [leaf  blocks  only]   array   of   freespace
841                                 records.  Each record contains startblock and
842                                 blockcount.
843                     keys        [non-leaf blocks only] array of key  records.
844                                 These  are  the  first value of each block in
845                                 the level below this one.  Each  record  con‐
846                                 tains blockcount and startblock.
847                     ptrs        [non-leaf  blocks  only] array of child block
848                                 pointers. Each  pointer  is  a  block  number
849                                 within the allocation group to the next level
850                                 in the Btree.
851
852       data      User file blocks, and other blocks  whose  type  is  unknown,
853                 have  this  type  for  display purposes in xfs_db.  The block
854                 data is displayed in hexadecimal format.
855
856       dir       A version 1 directory is organized as a Btree with the direc‐
857                 tory  data embedded in the leaf blocks. The root of the Btree
858                 is found in block 0 of the file. The index  (sort  order)  of
859                 the Btree is the hash value of the entry name. All the blocks
860                 contain a blkinfo structure at the beginning with the follow‐
861                 ing fields:
862                     forw        next sibling block.
863                     back        previous sibling block.
864                     magic       magic number for this block type.
865                 The non-leaf (node) blocks have the following fields:
866                     hdr         header  containing  a  blkinfo structure info
867                                 (magic number 0xfebe), the  count  of  active
868                                 entries,  and  the  level of this block above
869                                 the leaves.
870                     btree       array of entries containing hashval  and  be‐
871                                 fore fields. The before value is a block num‐
872                                 ber within the directory file  to  the  child
873                                 block,  the hashval is the last hash value in
874                                 that block.
875                 The leaf blocks have the following fields:
876                     hdr         header containing a  blkinfo  structure  info
877                                 (magic  number  0xfeeb),  the count of active
878                                 entries, namebytes (total name string bytes),
879                                 holes  flag  (block  needs  compaction),  and
880                                 freemap (array of base, size entries for free
881                                 regions).
882                     entries     array   of   structures  containing  hashval,
883                                 nameidx (byte index into  the  block  of  the
884                                 name string), and namelen.
885                     namelist    array  of  structures  containing inumber and
886                                 name.
887
888       dir2      A version 2 directory has four kinds of blocks.  Data  blocks
889                 start  at  offset 0 in the file.  There are two kinds of data
890                 blocks: single-block directories have  the  leaf  information
891                 embedded  at the end of the block, data blocks in multi-block
892                 directories do not.  Node and leaf  blocks  start  at  offset
893                 32GiB  (with  either  a  single  leaf  block or the root node
894                 block).  Freespace blocks start at offset  64GiB.   The  node
895                 and  leaf blocks form a Btree, with references to the data in
896                 the data blocks.  The freespace blocks form an index of long‐
897                 est free spaces within the data blocks.
898
899                 A single-block directory block contains the following fields:
900                     bhdr        header  containing  magic  number  0x58443242
901                                 ('XD2B') and an array bestfree of the longest
902                                 3 free spaces in the block (offset, length).
903                     bu          array  of  union  structures. Each element is
904                                 either an entry or a freespace.  For entries,
905                                 there  are  the  following  fields:  inumber,
906                                 namelen, name, and tag.  For freespace, there
907                                 are  the  following fields: freetag (0xffff),
908                                 length, and tag.  The tag value is  the  byte
909                                 offset in the block of the start of the entry
910                                 it is contained in.
911                     bleaf       array of leaf entries containing hashval  and
912                                 address.  The address is a 64-bit word offset
913                                 into the file.
914                     btail       tail structure containing the total count  of
915                                 leaf  entries  and stale count of unused leaf
916                                 entries.
917                 A data block contains the following fields:
918                     dhdr        header  containing  magic  number  0x58443244
919                                 ('XD2D') and an array bestfree of the longest
920                                 3 free spaces in the block (offset, length).
921                     du          array of union structures as for bu.
922                 Leaf blocks have two possible forms. If the Btree consists of
923                 a  single  leaf then the freespace information is in the leaf
924                 block, otherwise it is in separate blocks and the root of the
925                 Btree  is  a  node block. A leaf block contains the following
926                 fields:
927                     lhdr        header containing a  blkinfo  structure  info
928                                 (magic  number  0xd2f1  for  the  single leaf
929                                 case, 0xd2ff for the true  Btree  case),  the
930                                 total  count of leaf entries, and stale count
931                                 of unused leaf entries.
932                     lents       leaf entries, as for bleaf.
933                     lbests      [single leaf only] array of values which rep‐
934                                 resent  the  longest  freespace  in each data
935                                 block in the directory.
936                     ltail       [single leaf only] tail structure  containing
937                                 bestcount count of lbests.
938                 A node block is identical to that for types attr and dir.
939
940                 A freespace block contains the following fields:
941                     fhdr        header  containing  magic  number  0x58443246
942                                 ('XD2F'), firstdb  first  data  block  number
943                                 covered  by this freespace block, nvalid num‐
944                                 ber of valid entries, and nused number of en‐
945                                 tries representing real data blocks.
946                     fbests      array of values as for lbests.
947
948       dqblk     The  quota  information is stored in files referred to by the
949                 superblock uquotino  and  pquotino  fields.  Each  filesystem
950                 block in a quota file contains a constant number of quota en‐
951                 tries. The quota entry size is currently 136 bytes, so with a
952                 4KiB  filesystem  block  size  there are 30 quota entries per
953                 block. The dquot command is used to locate these  entries  in
954                 the  filesystem.  The file entries are indexed by the user or
955                 project identifier to determine the block and  offset.   Each
956                 quota entry has the following fields:
957                     magic          magic number, 0x4451 ('DQ').
958                     version        version number, currently 1.
959                     flags          flags, values include 0x01 for user quota,
960                                    0x02 for project quota.
961                     id             user or project identifier.
962                     blk_hardlimit  absolute limit on blocks in use.
963                     blk_softlimit  preferred limit on blocks in use.
964                     ino_hardlimit  absolute limit on inodes in use.
965                     ino_softlimit  preferred limit on inodes in use.
966                     bcount         blocks actually in use.
967                     icount         inodes actually in use.
968                     itimer         time when service will be refused if  soft
969                                    limit is violated for inodes.
970                     btimer         time  when service will be refused if soft
971                                    limit is violated for blocks.
972                     iwarns         number  of  warnings  issued  about  inode
973                                    limit violations.
974                     bwarns         number  of  warnings  issued  about  block
975                                    limit violations.
976                     rtb_hardlimit  absolute limit on realtime blocks in use.
977                     rtb_softlimit  preferred limit on realtime blocks in use.
978                     rtbcount       realtime blocks actually in use.
979                     rtbtimer       time when service will be refused if  soft
980                                    limit is violated for realtime blocks.
981                     rtbwarns       number  of  warnings issued about realtime
982                                    block limit violations.
983
984       inobt     There is one set of filesystem blocks forming the inode allo‐
985                 cation  Btree  for  each  allocation group. The root block of
986                 this Btree is designated by the root field in the correspond‐
987                 ing  AGI  block.   The  blocks are linked to sibling left and
988                 right blocks at each level, as well as by pointers from  par‐
989                 ent to child blocks.  Each block has the following fields:
990                     magic       INOBT    block   magic   number,   0x49414254
991                                 ('IABT').
992                     level       level number of this block, 0 is a leaf.
993                     numrecs     number of data entries in the block.
994                     leftsib     left (logically lower) sibling  block,  0  if
995                                 none.
996                     rightsib    right  (logically higher) sibling block, 0 if
997                                 none.
998                     recs        [leaf blocks only] array  of  inode  records.
999                                 Each  record  contains  startino  allocation-
1000                                 group relative inode number, freecount  count
1001                                 of  free  inodes in this chunk, and free bit‐
1002                                 map, LSB corresponds to inode 0.
1003                     keys        [non-leaf blocks only] array of key  records.
1004                                 These  are  the  first value of each block in
1005                                 the level below this one.  Each  record  con‐
1006                                 tains startino.
1007                     ptrs        [non-leaf  blocks  only] array of child block
1008                                 pointers. Each  pointer  is  a  block  number
1009                                 within the allocation group to the next level
1010                                 in the Btree.
1011
1012       inode     Inodes are allocated in "chunks" of 64 inodes each. Usually a
1013                 chunk is multiple filesystem blocks, although there are cases
1014                 with large filesystem blocks where a chunk is less  than  one
1015                 block.  The inode Btree (see inobt above) refers to the inode
1016                 numbers per allocation group. The inode numbers directly  re‐
1017                 flect  the location of the inode block on disk. Use the inode
1018                 command to point xfs_db to a specific inode. Each inode  con‐
1019                 tains four regions: core, next_unlinked, u, and a.  core con‐
1020                 tains the fixed information.  next_unlinked is separated from
1021                 the core due to journaling considerations, see type agi field
1022                 unlinked.  u is a union structure that is different  in  size
1023                 and  format  depending  on the type and representation of the
1024                 file data ("data fork").  a is an optional union structure to
1025                 describe  attribute  data, that is different in size, format,
1026                 and location depending on the presence and representation  of
1027                 attribute  data,  and  the  size  of  the  u data ("attribute
1028                 fork").  xfs_db automatically selects the proper  union  mem‐
1029                 bers based on information in the inode.
1030
1031                 The following are fields in the inode core:
1032                     magic       inode magic number, 0x494e ('IN').
1033                     mode        mode  and  type  of  file,  as  described  in
1034                                 chmod(2), mknod(2), and stat(2).
1035                     version     inode version, 1 or 2.
1036                     format      format of u union data (0: xfs_dev_t, 1:  lo‐
1037                                 cal  file - in-inode directory or symlink, 2:
1038                                 extent list, 3: Btree root, 4: unique id [un‐
1039                                 used]).
1040                     nlinkv1     number  of  links  to the file in a version 1
1041                                 inode.
1042                     nlinkv2     number of links to the file in  a  version  2
1043                                 inode.
1044                     projid_lo   owner's project id (low word; version 2 inode
1045                                 only).  projid_hi owner's  project  id  (high
1046                                 word; version 2 inode only).
1047                     uid         owner's user id.
1048                     gid         owner's group id.
1049                     atime       time last accessed (seconds and nanoseconds).
1050                     mtime       time last modified.
1051                     ctime       time created or inode last modified.
1052                     size        number of bytes in the file.
1053                     nblocks     total  number of blocks in the file including
1054                                 indirect and attribute.
1055                     extsize     basic/minimum extent size for the file.
1056                     nextents    number of extents in the data fork.
1057                     naextents   number of extents in the attribute fork.
1058                     forkoff     attribute fork offset in the inode, in 64-bit
1059                                 words from the start of u.
1060                     aformat     format of a data (1: local attribute data, 2:
1061                                 extent list, 3: Btree root).
1062                     dmevmask    DMAPI event mask.
1063                     dmstate     DMAPI state information.
1064                     newrtbm     file is the realtime bitmap and is "new" for‐
1065                                 mat.
1066                     prealloc    file has preallocated data space after EOF.
1067                     realtime    file data is in the realtime subvolume.
1068                     gen         inode generation number.
1069                 The following fields are in the u data fork union:
1070                     bmbt        bmap  Btree  root.  This looks like a bmapbtd
1071                                 block with redundant information removed.
1072                     bmx         array of extent descriptors.
1073                     dev         dev_t for the block or character device.
1074                     sfdir       shortform  (in-inode)  version  1  directory.
1075                                 This  consists of a hdr containing the parent
1076                                 inode number and a count of active entries in
1077                                 the  directory,  followed by an array list of
1078                                 hdr.count entries. Each such  entry  contains
1079                                 inumber, namelen, and name string.
1080                     sfdir2      shortform  (in-inode)  version  2  directory.
1081                                 This consists of a hdr containing a count  of
1082                                 active  entries  in the directory, an i8count
1083                                 of entries with inumbers that don't fit in  a
1084                                 32-bit  value,  and  the parent inode number,
1085                                 followed by an array list  of  hdr.count  en‐
1086                                 tries.  Each  such  entry contains namelen, a
1087                                 saved offset used when the directory is  con‐
1088                                 verted  to  a larger form, a name string, and
1089                                 the inumber.
1090                     symlink     symbolic link string value.
1091                 The following fields are in the a attribute fork union if  it
1092                 exists:
1093                     bmbt        bmap Btree root, as above.
1094                     bmx         array of extent descriptors.
1095                     sfattr      shortform  (in-inode)  attribute values. This
1096                                 consists of a hdr containing a totsize (total
1097                                 size in bytes) and a count of active entries,
1098                                 followed by an array list  of  hdr.count  en‐
1099                                 tries. Each such entry contains namelen, val‐
1100                                 uelen, root flag, name, and value.
1101
1102       log       Log blocks contain the journal entries  for  XFS.   It's  not
1103                 useful  to examine these with xfs_db, use xfs_logprint(8) in‐
1104                 stead.
1105
1106       refcntbt  There is one set of filesystem blocks forming  the  reference
1107                 count Btree for each allocation group. The root block of this
1108                 Btree is designated by the refcntroot  field  in  the  corre‐
1109                 sponding  AGF  block.   The blocks are linked to sibling left
1110                 and right blocks at each level, as well as by  pointers  from
1111                 parent to child blocks.  Each block has the following fields:
1112                     magic       REFC block magic number, 0x52334643 ('R3FC').
1113                     level       level number of this block, 0 is a leaf.
1114                     numrecs     number of data entries in the block.
1115                     leftsib     left  (logically  lower)  sibling block, 0 if
1116                                 none.
1117                     rightsib    right (logically higher) sibling block, 0  if
1118                                 none.
1119                     recs        [leaf  blocks  only] array of reference count
1120                                 records.  Each  record  contains  startblock,
1121                                 blockcount, and refcount.
1122                     keys        [non-leaf  blocks only] array of key records.
1123                                 These are the first value of  each  block  in
1124                                 the  level  below  this one. Each record con‐
1125                                 tains startblock.
1126                     ptrs        [non-leaf blocks only] array of  child  block
1127                                 pointers.  Each  pointer  is  a  block number
1128                                 within the allocation group to the next level
1129                                 in the Btree.
1130
1131       rmapbt    There  is  one  set  of filesystem blocks forming the reverse
1132                 mapping Btree for each allocation group. The  root  block  of
1133                 this  Btree is designated by the rmaproot field in the corre‐
1134                 sponding AGF block.  The blocks are linked  to  sibling  left
1135                 and  right  blocks at each level, as well as by pointers from
1136                 parent to child blocks.  Each block has the following fields:
1137                     magic       RMAP block magic number, 0x524d4233 ('RMB3').
1138                     level       level number of this block, 0 is a leaf.
1139                     numrecs     number of data entries in the block.
1140                     leftsib     left (logically lower) sibling  block,  0  if
1141                                 none.
1142                     rightsib    right  (logically higher) sibling block, 0 if
1143                                 none.
1144                     recs        [leaf blocks only] array of  reference  count
1145                                 records.  Each  record  contains  startblock,
1146                                 blockcount,   owner,    offset,    attr_fork,
1147                                 bmbt_block, and unwritten.
1148                     keys        [non-leaf  blocks  only]  array of double-key
1149                                 records. The first ("low") key  contains  the
1150                                 first  value of each block in the level below
1151                                 this one. The second  ("high")  key  contains
1152                                 the  largest key that can be used to identify
1153                                 any record in the subtree. Each  record  con‐
1154                                 tains  startblock,  owner, offset, attr_fork,
1155                                 and bmbt_block.
1156                     ptrs        [non-leaf blocks only] array of  child  block
1157                                 pointers.  Each  pointer  is  a  block number
1158                                 within the allocation group to the next level
1159                                 in the Btree.
1160
1161       rtbitmap  If  the  filesystem has a realtime subvolume, then the rbmino
1162                 field in the superblock refers to a file  that  contains  the
1163                 realtime  bitmap.   Each  bit in the bitmap file controls the
1164                 allocation of a single realtime extent  (set  ==  free).  The
1165                 bitmap  is  processed  in  32-bit words, the LSB of a word is
1166                 used for the first extent controlled by that bitmap word. The
1167                 atime  field  of the realtime bitmap inode contains a counter
1168                 that is used to control where the next new realtime file will
1169                 start.
1170
1171       rtsummary If  the filesystem has a realtime subvolume, then the rsumino
1172                 field in the superblock refers to a file  that  contains  the
1173                 realtime summary data. The summary file contains a two-dimen‐
1174                 sional array of 16-bit values.  Each value counts the  number
1175                 of  free extent runs (consecutive free realtime extents) of a
1176                 given range of sizes that starts in  a  given  bitmap  block.
1177                 The size ranges are binary buckets (low size in the bucket is
1178                 a power of 2).  There are as many size ranges as  are  neces‐
1179                 sary given the size of the realtime subvolume.  The first di‐
1180                 mension is the size range, the second dimension is the start‐
1181                 ing  bitmap  block  number (adjacent entries are for the same
1182                 size, adjacent bitmap blocks).
1183
1184       sb        There is one sb (superblock) structure per allocation  group.
1185                 It is the first disk block in the allocation group.  Only the
1186                 first one (block 0 of the filesystem) is actually  used;  the
1187                 other  blocks  are redundant information for xfs_repair(8) to
1188                 use if the first superblock is damaged. Fields defined:
1189                     magicnum    superblock magic number, 0x58465342 ('XFSB').
1190                     blocksize   filesystem block size in bytes.
1191                     dblocks     number of filesystem blocks  present  in  the
1192                                 data subvolume.
1193                     rblocks     number  of  filesystem  blocks present in the
1194                                 realtime subvolume.
1195                     rextents    number of realtime extents that rblocks  con‐
1196                                 tain.
1197                     uuid        unique identifier of the filesystem.
1198                     logstart    starting  filesystem  block number of the log
1199                                 (journal).  If this value is  0  the  log  is
1200                                 "external".
1201                     rootino     root inode number.
1202                     rbmino      realtime bitmap inode number.
1203                     rsumino     realtime summary data inode number.
1204                     rextsize    realtime extent size in filesystem blocks.
1205                     agblocks    size  of  an  allocation  group in filesystem
1206                                 blocks.
1207                     agcount     number of allocation groups.
1208                     rbmblocks   number of realtime bitmap blocks.
1209                     logblocks   number of log blocks (filesystem blocks).
1210                     versionnum  filesystem version information.   This  value
1211                                 is currently 1, 2, 3, or 4 in the low 4 bits.
1212                                 If the low bits are 4  then  the  other  bits
1213                                 have  additional meanings.  1 is the original
1214                                 value.  2 means that attributes were used.  3
1215                                 means  that  version  2  inodes  (large  link
1216                                 counts) were used.  4 is the bitmask  version
1217                                 of  the  version  number.   In this case, the
1218                                 other bits are used  as  flags  (0x0010:  at‐
1219                                 tributes  were used, 0x0020: version 2 inodes
1220                                 were used, 0x0040: quotas were used,  0x0080:
1221                                 inode  cluster alignment is in force, 0x0100:
1222                                 data stripe alignment is  in  force,  0x0200:
1223                                 the  shared_vn field is used, 0x1000: unwrit‐
1224                                 ten extent tracking is on, 0x2000: version  2
1225                                 directories are in use).
1226                     sectsize    sector  size  in bytes, currently always 512.
1227                                 This is the size of the  superblock  and  the
1228                                 other header blocks.
1229                     inodesize   inode size in bytes.
1230                     inopblock   number of inodes per filesystem block.
1231                     fname       obsolete, filesystem name.
1232                     fpack       obsolete, filesystem pack name.
1233                     blocklog    log2 of blocksize.
1234                     sectlog     log2 of sectsize.
1235                     inodelog    log2 of inodesize.
1236                     inopblog    log2 of inopblock.
1237                     agblklog    log2 of agblocks (rounded up).
1238                     rextslog    log2 of rextents.
1239                     inprogress  mkfs.xfs(8)  or  xfs_copy(8)  aborted  before
1240                                 completing this filesystem.
1241                     imax_pct    maximum percentage of filesystem  space  used
1242                                 for inode blocks.
1243                     icount      number of allocated inodes.
1244                     ifree       number  of  allocated  inodes that are not in
1245                                 use.
1246                     fdblocks    number of free data blocks.
1247                     frextents   number of free realtime extents.
1248                     uquotino    user quota inode number.
1249                     pquotino    project quota inode number; this is currently
1250                                 unused.
1251                     qflags      quota status flags (0x01: user quota account‐
1252                                 ing is on, 0x02: user quota  limits  are  en‐
1253                                 forced, 0x04: quotacheck has been run on user
1254                                 quotas, 0x08: project quota accounting is on,
1255                                 0x10:  project  quota  limits  are  enforced,
1256                                 0x20: quotacheck has been run on project quo‐
1257                                 tas).
1258                     flags       random flags. 0x01: only read-only mounts are
1259                                 allowed.
1260                     shared_vn   shared  version   number   (shared   readonly
1261                                 filesystems).
1262                     inoalignmt  inode chunk alignment in filesystem blocks.
1263                     unit        stripe or RAID unit.
1264                     width       stripe or RAID width.
1265                     dirblklog   log2  of  directory  block  size  (filesystem
1266                                 blocks).
1267
1268       symlink   Symbolic link blocks are used only  when  the  symbolic  link
1269                 value  does  not  fit  inside the inode. The block content is
1270                 just the string value.  Bytes past the  logical  end  of  the
1271                 symbolic link value have arbitrary values.
1272
1273       text      User  file  blocks,  and  other blocks whose type is unknown,
1274                 have this type for display purposes  in  xfs_db.   The  block
1275                 data  is  displayed  in  two  columns: Hexadecimal format and
1276                 printable ASCII chars.
1277

DIAGNOSTICS

1279       Many messages can come from  the  check  (blockget)  command.   If  the
1280       filesystem is completely corrupt, a core dump might be produced instead
1281       of the message
1282              device is not a valid filesystem
1283
1284       If the filesystem is very large (has many files) then check  might  run
1285       out of memory. In this case the message
1286              out of memory
1287       is printed.
1288
1289       The  following is a description of the most likely problems and the as‐
1290       sociated messages.  Most of the diagnostics produced are only  meaning‐
1291       ful with an understanding of the structure of the filesystem.
1292
1293       agf_freeblks n, counted m in ag a
1294              The  freeblocks count in the allocation group header for alloca‐
1295              tion group a doesn't match the number of blocks counted free.
1296
1297       agf_longest n, counted m in ag a
1298              The longest free extent in the allocation group header for allo‐
1299              cation  group  a  doesn't match the longest free extent found in
1300              the allocation group.
1301
1302       agi_count n, counted m in ag a
1303              The allocated inode count in the allocation group header for al‐
1304              location  group  a doesn't match the number of inodes counted in
1305              the allocation group.
1306
1307       agi_freecount n, counted m in ag a
1308              The free inode count in the allocation group header for  alloca‐
1309              tion  group a doesn't match the number of inodes counted free in
1310              the allocation group.
1311
1312       block a/b expected inum 0 got i
1313              The block number is specified as a pair (allocation  group  num‐
1314              ber, block in the allocation group).  The block is used multiple
1315              times (shared), between multiple inodes.  This  message  usually
1316              follows a message of the next type.
1317
1318       block a/b expected type unknown got y
1319              The block is used multiple times (shared).
1320
1321       block a/b type unknown not expected
1322

SEE ALSO

1324       mkfs.xfs(8),  xfs_admin(8),  xfs_copy(8),  xfs_logprint(8),  xfs_metad‐
1325       ump(8), xfs_ncheck(8),  xfs_repair(8),  mount(8),  chmod(2),  mknod(2),
1326       stat(2), xfs(5).
1327
1328
1329
1330                                                                     xfs_db(8)
Impressum