отлаживать файловую систему XFS (debug an XFS filesystem)
Концепции (Concepts)
xfs_db
commands can be broken up into two classes. Most commands
are for the navigation and display of data structures in the
filesystem. Other commands are for scanning the filesystem in
some way.
Commands which are used to navigate the filesystem structure take
arguments which reflect the names of filesystem structure fields.
There can be multiple field names separated by dots when the
underlying structures are nested, as in C. The field names can
be indexed (as an array index) if the underlying field is an
array. The array indices can be specified as a range, two
numbers separated by a dash.
xfs_db
maintains a current address in the filesystem. The
granularity of the address is a filesystem structure. This can
be a filesystem block, an inode or quota (smaller than a
filesystem block), or a directory block (could be larger than a
filesystem block). There are a variety of commands to set the
current address. Associated with the current address is the
current data type, which is the structural type of this data.
Commands which follow the structure of the filesystem always set
the type as well as the address. Commands which examine pieces
of an individual file (inode) need the current inode to be set,
this is done with the inode
command.
The current address/type information is actually maintained in a
stack that can be explicitly manipulated with the push
, pop
, and
stack
commands. This allows for easy examination of a nested
filesystem structure. Also, the last several locations visited
are stored in a ring buffer which can be manipulated with the
forward
, back
, and ring
commands.
XFS filesystems are divided into a small number of allocation
groups. xfs_db
maintains a notion of the current allocation
group which is manipulated by some commands. The initial
allocation group is 0.