| 1 |
.TH xfs_spaceman 8 |
| 2 |
.SH NAME |
| 3 |
xfs_spaceman \- show free space information about an XFS filesystem |
| 4 |
.SH SYNOPSIS |
| 5 |
.B xfs_spaceman |
| 6 |
[ |
| 7 |
.B \-c |
| 8 |
.I cmd |
| 9 |
] |
| 10 |
.I file |
| 11 |
.br |
| 12 |
.B xfs_spaceman \-V |
| 13 |
.SH DESCRIPTION |
| 14 |
.B xfs_spaceman |
| 15 |
reports and controls free space usage in an XFS filesystem. |
| 16 |
.SH OPTIONS |
| 17 |
.TP 1.0i |
| 18 |
.BI \-c " cmd" |
| 19 |
.B xfs_spaceman |
| 20 |
commands may be run interactively (the default) or as arguments on |
| 21 |
the command line. Multiple |
| 22 |
.B \-c |
| 23 |
arguments may be given. The commands are run in the sequence given, |
| 24 |
then the program exits. |
| 25 |
|
| 26 |
.SH COMMANDS |
| 27 |
.TP |
| 28 |
.BI "freesp [ \-dgrs ] [-a agno]... [ \-b | \-e bsize | \-h bsize | \-m factor ]" |
| 29 |
With no arguments, |
| 30 |
.B freesp |
| 31 |
shows a histogram of all free space extents in the filesystem. |
| 32 |
The command takes the following options: |
| 33 |
|
| 34 |
.RS 1.0i |
| 35 |
.PD 0 |
| 36 |
.TP 0.4i |
| 37 |
.B \-a agno |
| 38 |
Collect free space information from this allocation group. |
| 39 |
This option can be specified multiple times to collect from multiple groups. |
| 40 |
|
| 41 |
.TP |
| 42 |
.B \-b |
| 43 |
This argument establishes that the histogram bin sizes are successive powers of two. |
| 44 |
This is the default, and is mutually exclusive with the |
| 45 |
.BR "-e" ", " "-h" ", and " "-m" " options." |
| 46 |
|
| 47 |
.TP |
| 48 |
.B \-d |
| 49 |
Print debugging information such as the raw free space extent information. |
| 50 |
|
| 51 |
.TP |
| 52 |
.B \-g |
| 53 |
Print the free space block and extent counts for each AG. |
| 54 |
|
| 55 |
.TP |
| 56 |
.B \-e bsize |
| 57 |
Set all histogram bin sizes to a specific value. |
| 58 |
This option is mutually exclusive with the |
| 59 |
.BR "-b" ", " "-h" ", and " "-m" " options." |
| 60 |
|
| 61 |
.TP |
| 62 |
.B \-h bsize |
| 63 |
Create a histogram bin with a lower bound of this value. |
| 64 |
The upper bound of this bin will be one less than the lower bound of the |
| 65 |
next highest histogram bin. |
| 66 |
This option can be given multiple times to control the exact bin sizes. |
| 67 |
This option is mutually exclusive with the |
| 68 |
.BR "-b" ", " "-e" ", and " "-m" " options." |
| 69 |
|
| 70 |
.TP |
| 71 |
.B \-m factor |
| 72 |
Create each histogram bin with a size that is this many times the size |
| 73 |
of the prvious bin created. |
| 74 |
This option is mutually exclusive with the |
| 75 |
.BR "-b" ", " "-e" ", and " "-h" " options." |
| 76 |
|
| 77 |
.TP |
| 78 |
.B \-r |
| 79 |
Query the realtime device for free space information. |
| 80 |
|
| 81 |
.TP |
| 82 |
.B \-s |
| 83 |
Display a summary of the free space information found. |
| 84 |
.PD |
| 85 |
.RE |
| 86 |
.TP |
| 87 |
.B info |
| 88 |
Displays selected geometry information about the filesystem. |
| 89 |
The opened file must be a mount point of a XFS filesystem. |
| 90 |
The output will have the same format that |
| 91 |
.BR "xfs_info" "(8)" |
| 92 |
prints when querying a filesystem. |
| 93 |
.TP |
| 94 |
.BI "health [ \-a agno] [ \-c ] [ \-f ] [ \-i inum ] [ \-n ] [ \-q ] [ \-r rgno ] [ paths ]" |
| 95 |
Reports the health of the given group of filesystem metadata. |
| 96 |
.RS 1.0i |
| 97 |
.PD 0 |
| 98 |
.TP 0.4i |
| 99 |
.B \-a agno |
| 100 |
Report on the health of the given allocation group. |
| 101 |
.TP |
| 102 |
.B \-c |
| 103 |
Scan all inodes in the filesystem and report each file's health status. |
| 104 |
If the |
| 105 |
.B \-a |
| 106 |
option is given, scan only the inodes in that AG. |
| 107 |
.TP |
| 108 |
.B \-f |
| 109 |
Report on the health of metadata that affect the entire filesystem. |
| 110 |
.TP |
| 111 |
.B \-i inum |
| 112 |
Report on the health of a specific inode. |
| 113 |
.TP |
| 114 |
.B \-n |
| 115 |
When reporting on the health of a file, try to report the full file path, |
| 116 |
if possible. |
| 117 |
This option is disabled by default to minimize runtime. |
| 118 |
.TP |
| 119 |
.B \-q |
| 120 |
Report only unhealthy metadata. |
| 121 |
.TP |
| 122 |
.B \-r |
| 123 |
Report on the health of the given realtime group. |
| 124 |
.TP |
| 125 |
.B paths |
| 126 |
Report on the health of the files at the given path. |
| 127 |
.PD |
| 128 |
.RE |
| 129 |
.TP |
| 130 |
.BR "help [ " command " ]" |
| 131 |
Display a brief description of one or all commands. |
| 132 |
.TP |
| 133 |
.BI "prealloc [ \-u id ] [ \-g id ] [ -p id ] [ \-m minlen ] [ \-s ]" |
| 134 |
Removes speculative preallocation. |
| 135 |
If no |
| 136 |
.BR "-u" ", " "-g" ", or " "-p" |
| 137 |
options are given, this command acts on all files. |
| 138 |
The command takes the following options: |
| 139 |
|
| 140 |
.RS 1.0i |
| 141 |
.PD 0 |
| 142 |
.TP 0.4i |
| 143 |
.B \-u uid |
| 144 |
Clear all speculative preallocations for files with this user id. |
| 145 |
This option can be given in combination with the |
| 146 |
.B "-g" " and " "-p" |
| 147 |
options. |
| 148 |
|
| 149 |
.TP |
| 150 |
.B \-g gid |
| 151 |
Clear all speculative preallocations for files with this group id. |
| 152 |
This option can be given in combination with the |
| 153 |
.B "-u" " and " "-p" |
| 154 |
options. |
| 155 |
|
| 156 |
.TP |
| 157 |
.B \-p pid |
| 158 |
Clear all speculative preallocations for files with this project id. |
| 159 |
This option can be given in combination with the |
| 160 |
.B "-u" " and " "-g" |
| 161 |
options. |
| 162 |
|
| 163 |
.TP |
| 164 |
.B \-m minlen |
| 165 |
Ignore all files smaller than this size. |
| 166 |
Units can be supplied for this argument. |
| 167 |
|
| 168 |
.TP |
| 169 |
.B \-s |
| 170 |
Wait for removal to complete. |
| 171 |
.PD |
| 172 |
.RE |
| 173 |
.TP |
| 174 |
.B print |
| 175 |
Display a list of all open files. |
| 176 |
.TP |
| 177 |
.B quit |
| 178 |
Exit |
| 179 |
.BR xfs_spaceman . |
| 180 |
.TP |
| 181 |
.BI "trim ( \-a agno | \-f | " "offset" " " "length" " ) [ -m minlen ]" |
| 182 |
Instructs the underlying storage device to release all storage that may |
| 183 |
be backing free space in the filesystem. |
| 184 |
The command takes the following options: |
| 185 |
(One of |
| 186 |
.BR -a ", " -f ", or the " |
| 187 |
.IR offset / length |
| 188 |
pair are required.) |
| 189 |
|
| 190 |
.RS 1.0i |
| 191 |
.PD 0 |
| 192 |
.TP 0.4i |
| 193 |
.B \-a agno |
| 194 |
Trim free space extents in the given allocation group. |
| 195 |
This option is mutually exclusive with the |
| 196 |
.BR "-f" " option and the " |
| 197 |
.IR "offset" "/" "length" " options." |
| 198 |
|
| 199 |
.TP |
| 200 |
.B \-f |
| 201 |
Trim all free space in the filesystem. |
| 202 |
This option is mutually exclusive with the |
| 203 |
.BR "-a" " option and the " |
| 204 |
.IR "offset" "/" "length" " options." |
| 205 |
|
| 206 |
.TP |
| 207 |
.IR "option" ", " "length" |
| 208 |
Trim all free space within the physical range defined by the |
| 209 |
.I offset |
| 210 |
and |
| 211 |
.I length |
| 212 |
from this filesystem. |
| 213 |
Units can be appended to these arguments. |
| 214 |
This option is mutually exclusive with the |
| 215 |
.BR "-a" " and " "-f" " options." |
| 216 |
|
| 217 |
.TP |
| 218 |
.B \-m minlen |
| 219 |
Do not trim free space extents shorter than this length. |
| 220 |
Units can be appended to this argument. |
| 221 |
.PD |
| 222 |
.RE |