]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - man/man8/xfs_spaceman.8
xfs_repair: pass ops through during scan
[thirdparty/xfsprogs-dev.git] / man / man8 / xfs_spaceman.8
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 .BR "help [ " command " ]"
95 Display a brief description of one or all commands.
96 .TP
97 .BI "prealloc [ \-u id ] [ \-g id ] [ -p id ] [ \-m minlen ] [ \-s ]"
98 Removes speculative preallocation.
99 If no
100 .BR "-u" ", " "-g" ", or " "-p"
101 options are given, this command acts on all files.
102 The command takes the following options:
103
104 .RS 1.0i
105 .PD 0
106 .TP 0.4i
107 .B \-u uid
108 Clear all speculative preallocations for files with this user id.
109 This option can be given in combination with the
110 .B "-g" " and " "-p"
111 options.
112
113 .TP
114 .B \-g gid
115 Clear all speculative preallocations for files with this group id.
116 This option can be given in combination with the
117 .B "-u" " and " "-p"
118 options.
119
120 .TP
121 .B \-p pid
122 Clear all speculative preallocations for files with this project id.
123 This option can be given in combination with the
124 .B "-u" " and " "-g"
125 options.
126
127 .TP
128 .B \-m minlen
129 Ignore all files smaller than this size.
130 Units can be supplied for this argument.
131
132 .TP
133 .B \-s
134 Wait for removal to complete.
135 .PD
136 .RE
137 .TP
138 .B print
139 Display a list of all open files.
140 .TP
141 .B quit
142 Exit
143 .BR xfs_spaceman .
144 .TP
145 .BI "trim ( \-a agno | \-f | " "offset" " " "length" " ) [ -m minlen ]"
146 Instructs the underlying storage device to release all storage that may
147 be backing free space in the filesystem.
148 The command takes the following options:
149 (One of
150 .BR -a ", " -f ", or the "
151 .IR offset / length
152 pair are required.)
153
154 .RS 1.0i
155 .PD 0
156 .TP 0.4i
157 .B \-a agno
158 Trim free space extents in the given allocation group.
159 This option is mutually exclusive with the
160 .BR "-f" " option and the "
161 .IR "offset" "/" "length" " options."
162
163 .TP
164 .B \-f
165 Trim all free space in the filesystem.
166 This option is mutually exclusive with the
167 .BR "-a" " option and the "
168 .IR "offset" "/" "length" " options."
169
170 .TP
171 .IR "option" ", " "length"
172 Trim all free space within the physical range defined by the
173 .I offset
174 and
175 .I length
176 from this filesystem.
177 Units can be appended to these arguments.
178 This option is mutually exclusive with the
179 .BR "-a" " and " "-f" " options."
180
181 .TP
182 .B \-m minlen
183 Do not trim free space extents shorter than this length.
184 Units can be appended to this argument.
185 .PD
186 .RE