bulkstat [ -a
agno ] [ -d ] [ -e
endino ] [ -n
batchsize ] [ -s
startino ] [ -v
version"]
Display raw stat information about a bunch of inodes in an
XFS filesystem. Options are as follows:
-a
agno
Display only results from the given allocation
group. If not specified, all results returned
will be displayed.
-d
Print debugging information about call results.
-e
endino
Stop displaying records when this inode number
is reached. Defaults to stopping when the
system call stops returning results.
-n
batchsize
Retrieve at most this many records per call.
Defaults to 4,096.
-s
startino
Display inode allocation records starting with
this inode. Defaults to the first inode in the
filesystem. If the given inode is not
allocated, results will begin with the next
allocated inode in the filesystem.
-v
version
Use a particular version of the kernel
interface. Currently supported versions are 1
and 5.
bulkstat_single [ -d ] [ -v
version ] [
inum... |
special... ]
Display raw stat information about individual inodes in an
XFS filesystem. The -d
and -v
options are the same as the
bulkstat
command. Arguments must be inode numbers or any
of the special values:
root
Display information about the root directory
inode.
freeze
Suspend all write I/O requests to the filesystem of the
current file. Only available in expert mode and requires
privileges.
thaw
Undo the effects of a filesystem freeze operation. Only
available in expert mode and requires privileges.
inject [
tag ]
Inject errors into a filesystem to observe filesystem
behavior at specific points under adverse conditions.
Without the tag argument, displays the list of error tags
available. Only available in expert mode and requires
privileges.
resblks [
blocks ]
Get and/or set count of reserved filesystem blocks using
the XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system
calls. Note -- this can be useful for exercising out of
space behavior. Only available in expert mode and
requires privileges.
shutdown
[ -f
]
Force the filesystem to shut down, preventing any further
IO. XFS and other filesystems implement this
functionality, although implementation details may differ
slightly. Only available in expert mode and requires
privileges.
By default, the filesystem will not attempt to flush
completed transactions to disk before shutting down the
filesystem. This simulates a disk failure or crash.
-f
Force the filesystem to flush all completed
transactions to disk before shutting down, matching
XFS behavior when critical corruption is
encountered.
statfs [ -c ] [ -g ] [ -s ]
Report selected statistics on the filesystem where the
current file resides. The default behavior is to enable
all three reporting options:
-c
Display XFS_IOC_FSCOUNTERS
summary counter data.
-g
Display XFS_IOC_FSGEOMETRY
filesystem geometry
data.
-s
Display statfs(2) data.
inode [ [ -n ]
number ] [ -v ]
The inode command queries physical information about an
inode. With no arguments, it will return 1 or 0,
indicating whether or not any inode numbers greater than
32 bits are currently in use in the filesystem. If given
an inode number as an argument, the command will return
the same inode number if it is in use, or 0 if not. With
-n
number , the next used inode number after this number
will be returned, or zero if the supplied inode number is
the highest one in use. With -v
the command will also
report the number of bits (32 or 64) used by the inode
number printed in the result; if no inode number was
specified on the command line, the maximum possible inode
number in the system will be printed along with its size.
inumbers [ -a
agno ] [ -d ] [ -e
endino ] [ -n
batchsize ] [ -s
startino ] [ -v
version ]
Prints allocation information about groups of inodes in an
XFS filesystem. Callers can use this information to
figure out which inodes are allocated. Options are as
follows:
-a
agno
Display only results from the given allocation
group. If not specified, all results returned
will be displayed.
-d
Print debugging information about call results.
-e
endino
Stop displaying records when this inode number
is reached. Defaults to stopping when the
system call stops returning results.
-n
batchsize
Retrieve at most this many records per call.
Defaults to 4,096.
-s
startino
Display inode allocation records starting with
this inode. Defaults to the first inode in the
filesystem. If the given inode is not
allocated, results will begin with the next
allocated inode in the filesystem.
-v
version
Use a particular version of the kernel
interface. Currently supported versions are 1
and 5.
scrub
type [
agnumber |
ino gen ]
Scrub internal XFS filesystem metadata. The type
parameter specifies which type of metadata to scrub. For
AG metadata, one AG number must be specified. For file
metadata, the scrub is applied to the open file unless the
inode number and generation number are specified.
repair
type [
agnumber |
ino gen ]
Repair internal XFS filesystem metadata. The type
parameter specifies which type of metadata to repair. For
AG metadata, one AG number must be specified. For file
metadata, the repair is applied to the open file unless
the inode number and generation number are specified.
label [ -c | -s
label ]
On filesystems that support online label manipulation,
get, set, or clear the filesystem label. With no options,
print the current filesystem label. The -c
option clears
the filesystem label by setting it to the null string.
The -s
label option sets the filesystem label to label.
If the label is longer than the filesystem will accept,
xfs_io
will print an error message. XFS filesystem labels
can be at most 12 characters long.
fsmap [ -d | -l | -r ] [ -m | -v ] [ -n
nx ] [
start ] [
end ]
Prints the mapping of disk blocks used by the filesystem
hosting the current file. The map lists each extent used
by files, allocation group metadata, journalling logs, and
static filesystem metadata, as well as any regions that
are unused. Each line of the listings takes the following
form:
extent: major:minor [startblock..endblock]: owner
startoffset..endoffset length
Static filesystem metadata, allocation group metadata,
btrees, journalling logs, and free space are marked by
replacing the startoffset..endoffset with the appropriate
marker. All blocks, offsets, and lengths are specified in
units of 512-byte blocks, no matter what the filesystem's
block size is. The optional start and end arguments can
be used to constrain the output to a particular range of
disk blocks. If these two options are specified, exactly
one of -d
, -l
, or -r
must also be set.
-d
Display only extents from the data device. This
option only applies for XFS filesystems.
-l
Display only extents from the external log
device. This option only applies to XFS
filesystems.
-r
Display only extents from the realtime device.
This option only applies to XFS filesystems.
-m
Display results in a machine readable format
(CSV). This option is not compatible with the
-v
flag. The columns of the output are: extent
number, device major, device minor, physical
start, physical end, owner, offset start, offset
end, length. The start, end, and length numbers
are provided in units of 512b. The owner field
is a special string that takes the form:
inode_%lld_data
for inode data.
inode_%lld_data_bmbt
for inode data extent maps.
inode_%lld_attr
for inode extended attribute data.
inode_%lld_attr_bmbt
for inode extended attribute extent maps.
special_%u:%u
for other filesystem metadata.
-n
num_extents
If this option is given, fsmap
obtains the
extent list of the file in groups of num_extents
extents. In the absence of -n
, fsmap
queries
the system for extents in groups of 131,072
records.
-v
Shows verbose information. When this flag is
specified, additional AG specific information is
appended to each line in the following form:
agno (startagblock..endagblock) nblocks
flags
A second -v
option will print out the flags
legend. This option is not compatible with the
-m
flag.