xfs_spaceman(8)
π xfs_spaceman(8) β the System Manager's Manual's absolute baddie π
okay bestie, sit DOWN, because we're about to talk about xfs_spaceman, and she is that girl. This is a page from the System Manager's Manual, so you already know it's giving official. π
β¨ NAME β¨
xfs_spaceman β show free space information about an XFS filesystem π
πΈ SYNOPSIS πΈ
xfs_spaceman [ -c cmd ] file
xfs_spaceman -V
π¦ DESCRIPTION π¦
xfs_spaceman reports and controls free space usage in an XFS filesystem. that's it, that's the whole vibe. she tells you what your free space is doing and she can also, like, do things about it. no cap. β¨
π OPTIONS π
-c cmdβ xfs_spaceman commands can be run interactively (which is the default, no thoughts just vibes) or you can hand them over as arguments on the command line. you can give multiple-carguments, bestie, go off. the commands run in the exact sequence you gave them, and then the program exits. bye π
π COMMANDS π
π freesp
freesp [ -dgrs ] [-a agno]... [ -b | -e bsize | -h bsize | -m factor ]
with no arguments, freesp shows a histogram of all the free space extents in the filesystem. iconic behavior honestly. the command takes the following options:
-a agnoβ collect free space information from this allocation group. you can specify this option multiple times to collect from multiple groups. (collect them all, pokΓ©mon style π§)-bβ this argument establishes that the histogram bin sizes are successive powers of two. this is the default, and it is mutually exclusive with the-e,-h, and-moptions. pick a lane, bestie.-dβ print debugging information, like the raw free space extent information. it's giving "let me see the receipts" π-gβ print the free space block and extent counts for each AG.-e bsizeβ set all histogram bin sizes to one specific value. mutually exclusive with the-b,-h, and-moptions.-h bsizeβ create a histogram bin with a lower bound of this value. the upper bound of this bin will be one less than the lower bound of the next highest histogram bin. you can give this option multiple times to control the exact bin sizes, so precise, so main character. mutually exclusive with the-b,-e, and-moptions.-m factorβ create each histogram bin with a size that is this many times the size of the previous bin created. mutually exclusive with the-b,-e, and-hoptions.-rβ query the realtime device for free space information. going straight to the source, love that for her. π₯-sβ display a summary of the free space information found.
π makecfg
makecfg [path]
write a configuration file to the given path that can be re-read by mkfs.xfs for a future filesystem format attempt. this file will contain only user-visible features. filesystem geometry information is not written to the configuration file. if you don't give a path, the configuration gets printed on standard output instead. convenient! β¨
π info
displays selected geometry information about the filesystem. the opened file must be a mount point of an XFS filesystem β no exceptions, she's not doing that for you. the output will have the same format that xfs_info(8) prints when querying a filesystem. matching outfits, cute. π
π«Ά health
health [ -a agno] [ -c ] [ -f ] [ -i inum ] [ -n ] [ -q ] [ -r rgno ] [ paths ]
reports the health of the given group of filesystem metadata. let's get a little wellness check going, shall we?
-a agnoβ report on the health of the given allocation group.-cβ scan all inodes in the filesystem and report each file's health status. if the-aoption is given, scan only the inodes in that AG. (scoping! we love scoping!)-fβ report on the health of metadata that affect the entire filesystem.-i inumβ report on the health of a specific inode.-nβ when reporting on the health of a file, try to report the full file path, if possible. this option is disabled by default to minimize runtime. (she's just trying to be fast, leave her alone π)-qβ report only unhealthy metadata. no small talk, only problems.-rβ report on the health of the given realtime group.- paths β report on the health of the files at the given path.
π help
help [ command ]
display a brief description of one or all commands. asking for help is self-care, bestie. π«Ά
πΈ prealloc
prealloc [ -u id ] [ -g id ] [ -p id ] [ -m minlen ] [ -s ]
removes speculative preallocation. if you don't give any -u, -g, or -p options, this command acts on all files. the command takes the following options:
-u uidβ clear all speculative preallocations for files with this user id. this option can be given in combination with the-gand-poptions.-g gidβ clear all speculative preallocations for files with this group id. this option can be given in combination with the-uand-poptions.-p pidβ clear all speculative preallocations for files with this project id. this option can be given in combination with the-uand-goptions.-m minlenβ ignore all files smaller than this size. units can be supplied for this argument. (small files stay unbothered β¨)-sβ wait for removal to complete. patience is a virtue, she said it first.
π
display a list of all open files. simple, direct, slay. π
β quit
exit xfs_spaceman. sometimes you just gotta log off, and that's valid. π
π¦ trim
trim ( -a agno | -f | offset length ) [ -m minlen ]
instructs the underlying storage device to release all storage that may be backing free space in the filesystem. she's telling the drive "you don't need that, let it go, release it, it's not yours anymore." the command takes the following options: (one of -a, -f, or the offset/length pair is required.)
-a agnoβ trim free space extents in the given allocation group. this option is mutually exclusive with the-foption and the offset/length options.-fβ trim all free space in the filesystem. this option is mutually exclusive with the-aoption and the offset/length options.- option, length β trim all free space within the physical range defined by the offset and length from this filesystem. units can be appended to these arguments. this option is mutually exclusive with the
-aand-foptions. -m minlenβ do not trim free space extents shorter than this length. units can be appended to this argument.
β οΈ real talk for one sec: those-a/-f/ offset-length options are mutually exclusive, and the offset/length pair is required if you're not using-aor-f. the page says it twice because it means it. don't fight the manpage, bestie. π€
and that's the whole page, no notes, ate and left no crumbs πβ¨
this has been your girl from the System Manager's Manual, and the page signs off as xfs_spaceman(8) β version and date vibes straight from that footer, mwah π
π¦ where this page comes from
- arch rolling: xfsprogs 7.2.0-1
- arch rolling: xfsprogs 7.2.1-1 Β· GPL-2.0-only AND LGPL-2.1-only
- nixpkgs unstable: xfsprogs 7.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms