1xfs_spaceman(8)             System Manager's Manual            xfs_spaceman(8)
2
3
4

NAME

6       xfs_spaceman - show free space information about an XFS filesystem
7

SYNOPSIS

9       xfs_spaceman [ -c cmd ] file
10       xfs_spaceman -V
11

DESCRIPTION

13       xfs_spaceman  reports  and controls free space usage in an XFS filesys‐
14       tem.
15

OPTIONS

17       -c cmd    xfs_spaceman commands may be run interactively (the  default)
18                 or  as  arguments  on the command line. Multiple -c arguments
19                 may be given. The commands are run  in  the  sequence  given,
20                 then the program exits.
21
22

COMMANDS

24       freesp [ -dgrs ] [-a agno]... [ -b | -e bsize | -h bsize | -m factor ]
25              With  no  arguments,  freesp shows a histogram of all free space
26              extents in the filesystem.   The  command  takes  the  following
27              options:
28
29                 -a agno
30                     Collect  free  space  information  from  this  allocation
31                     group.  This option can be specified  multiple  times  to
32                     collect from multiple groups.
33
34                 -b  This  argument  establishes  that the histogram bin sizes
35                     are successive powers of two.  This is the  default,  and
36                     is mutually exclusive with the -e, -h, and -m options.
37
38                 -d  Print  debugging  information  such as the raw free space
39                     extent information.
40
41                 -g  Print the free space block and extent counts for each AG.
42
43                 -e bsize
44                     Set all histogram bin sizes to a  specific  value.   This
45                     option  is  mutually  exclusive  with  the -b, -h, and -m
46                     options.
47
48                 -h bsize
49                     Create a histogram bin with a lower bound of this  value.
50                     The  upper  bound  of  this bin will be one less than the
51                     lower bound of the  next  highest  histogram  bin.   This
52                     option  can  be given multiple times to control the exact
53                     bin sizes.  This option is mutually  exclusive  with  the
54                     -b, -e, and -m options.
55
56                 -m factor
57                     Create  each  histogram bin with a size that is this many
58                     times the size of the prvious bin created.   This  option
59                     is mutually exclusive with the -b, -e, and -h options.
60
61                 -r  Query the realtime device for free space information.
62
63                 -s  Display a summary of the free space information found.
64
65       info   Displays  selected  geometry  information  about the filesystem.
66              The opened file must be a mount point of a XFS filesystem.   The
67              output  will  have  the same format that xfs_info(8) prints when
68              querying a filesystem.
69
70       health [ -a agno] [ -c ] [ -f ] [ -i inum ] [ -q ] [ paths ]
71              Reports the health of the given group of filesystem metadata.
72                 -a agno
73                     Report on the health of the given allocation group.
74                 -c  Scan all inodes in the filesystem and report each  file's
75                     health  status.  If the -a option is given, scan only the
76                     inodes in that AG.
77                 -f  Report on the health of metadata that affect  the  entire
78                     filesystem.
79                 -i inum
80                     Report on the health of a specific inode.
81                 -q  Report only unhealthy metadata.
82                 paths
83                     Report on the health of the files at the given path.
84
85       help [ command ]
86              Display a brief description of one or all commands.
87
88       prealloc [ -u id ] [ -g id ] [ -p id ] [ -m minlen ] [ -s ]
89              Removes  speculative preallocation.  If no -u, -g, or -p options
90              are given, this command acts on all files.   The  command  takes
91              the following options:
92
93                 -u uid
94                     Clear  all speculative preallocations for files with this
95                     user id.  This option can be given  in  combination  with
96                     the -g  and  -p options.
97
98                 -g gid
99                     Clear  all speculative preallocations for files with this
100                     group id.  This option can be given in  combination  with
101                     the -u  and  -p options.
102
103                 -p pid
104                     Clear  all speculative preallocations for files with this
105                     project id.  This option can be given in combination with
106                     the -u  and  -g options.
107
108                 -m minlen
109                     Ignore  all  files  smaller than this size.  Units can be
110                     supplied for this argument.
111
112                 -s  Wait for removal to complete.
113
114       print  Display a list of all open files.
115
116       quit   Exit xfs_spaceman.
117
118       trim ( -a agno | -f | offset length ) [ -m minlen ]
119              Instructs the underlying storage device to release  all  storage
120              that  may  be backing free space in the filesystem.  The command
121              takes the following  options:  (One  of  -a,  -f,  or  the  off‐
122              set/length pair are required.)
123
124                 -a agno
125                     Trim  free  space  extents in the given allocation group.
126                     This option is mutually exclusive with the -f option  and
127                     the offset/length options.
128
129                 -f  Trim  all  free  space in the filesystem.  This option is
130                     mutually exclusive  with  the  -a  option  and  the  off‐
131                     set/length options.
132
133                 option, length
134                     Trim  all free space within the physical range defined by
135                     the offset and length from this filesystem.  Units can be
136                     appended  to  these  arguments.   This option is mutually
137                     exclusive with the -a and -f options.
138
139                 -m minlen
140                     Do not trim free space extents shorter than this  length.
141                     Units can be appended to this argument.
142
143
144
145                                                               xfs_spaceman(8)
Impressum