Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[fs/lustre-release.git] / lustre / doc / lfs-df.1
1 .TH lfs-df 1 "2016 Dec 7" Lustre "user utilities"
2 .SH NAME
3 lfs df \- report Lustre filesystem disk usage
4 .SH SYNOPSIS
5 .BR "lfs df" " [" -i "] [" -h | -H ]
6 .RB [ --lazy | -l ]
7 .RB [ --pool | -p
8 .IR <fsname> [. <pool> ]]
9 .RB [ --verbose | -v ]
10 .RI [ path ]
11 .SH DESCRIPTION
12 .B lfs df
13 displays filesystem usage information by default for each Lustre
14 filesystem currently mounted on that node, or for the filesystem
15 that contains
16 .I path
17 if given. It displays the current usage and totals for each MDT and
18 OST separately, as well as a per-filesystem summary that matches
19 .BR df (1)
20 output for each filesystem.
21 .PP
22 By default
23 .B lfs df
24 reports the
25 .I space
26 usage of the OSTs (the MDT space usage is shown only for reference).  With
27 .B -i
28 it reports the
29 .I inode
30 (object) usage for each target and in the summary.  For ZFS-backed
31 targets, the
32 .B IUsed
33 count accurately reflects the number of in-use objects on each target,
34 but the
35 .B Inodes
36 total and
37 .B Free
38 inode counts are
39 .I estimated
40 based on the current average (mean) space used per object on each target,
41 and may fluctuate over time to reflect the current usage pattern of
42 the target.  The estimate becomes more accurate as the target becomes
43 more full, assuming the usage pattern is consistent.
44 .PP
45 .B lfs df
46 may also report additional target status as the last column in the
47 display, if there are issues with that target.  States include:
48 .RS 0.3i
49 .TP
50 .B D: degraded
51 The target has a failed drive in the RAID device, or is undergoing
52 RAID reconstruction.  This state is marked on the server automatically
53 for ZFS targets via
54 .BR zed (8),
55 or a (user-supplied) script that monitors the target device and sets
56 .B 'lctl set_param obdfilter.\fI<target>\fB.degraded=1'
57 on the OST.  This target will be avoided for new allocations, but
58 will still be used for existing files located there or if there are
59 not enough non-degraded OSTs to make up a widely-striped file.
60 .TP
61 .B N: no-precreate
62 The target is configured to deny object precreation by the
63 .B 'lctl set_param obdfilter.\fI<target>\fB.no_precreate=1'
64 parameter or
65 .B '-o no_precreate'
66 mount option.  This may be done to add an OST to the filesystem without
67 allowing objects to be allocated on it yet, or for other reasons.
68 .TP
69 .B R: read-only
70 The target filesystem is marked read-only due to filesystem
71 corruption detected by ldiskfs or ZFS.  No modifications are
72 allowed on this OST, and it needs to have
73 .BR e2fsck (8)
74 or
75 .BR zpool (8) " scrub"
76 run to repair the underlying filesystem.
77 .TP
78 .B S: out-of-space
79 The target filesystem has less than the minimum required free space and
80 will not be used for new object allocations until it has more free space.
81 .TP
82 .B I: out-of-inodes
83 The target filesystem has less than the minimum required free inodes and
84 will not be used for new object allocations until it has more free inodes.
85 .TP
86 .B f: flash
87 The target filesystem is using a flash (non-rotational) storage device.
88 This lower-case status is only shown in conjunction with the
89 .B -v
90 option, since it is not an error condition.
91 .RE
92 .SH OPTIONS
93 The various options supported by
94 .B lfs df
95 are listed and explained below:
96 .TP
97 .BR -h ", " --human-readable
98 Print output in a human readable format (e.g. 16.3T, 4.25P).
99 Suffixes are base-2 units (i.e. 1 GiB = 1024 MiB).
100 .TP
101 .BR -H ", " --si
102 Like
103 .BR -h ,
104 but suffixes are SI base-10 units (i.e. 1 GB = 1000 MB).
105 .TP
106 .BR -i ", " --inodes
107 Print information about the inode usage and totals for the MDTs and
108 OSTs rather than space usage.  Note that the
109 .B Inodes
110 total,
111 .BR IUsed ,
112 and
113 .B IFree
114 counts typically reflect the
115 .I sum
116 of values from the MDTs.  If the total number of objects available
117 on the OSTs is smaller (factoring in the filesystem default
118 .BR stripe_count ,
119 as one OST object is used for each stripe in a file)
120 then the reported
121 .B Inodes
122 and
123 .B IFree
124 values will be reduced to reflect the
125 .I minimum
126 number of files that could potentially be created with the default
127 stripe count.  The actual total number of files that can be created
128 may be different.
129 .TP
130 .BR -l ", " --lazy
131 Do not attempt to contact any OST or MDT not currently connected to
132 the client.  This avoids blocking the
133 .B lfs df
134 output if a target is offline or unreachable, and only returns the
135 space on OSTs that can currently be accessed.
136 .TP
137 .BR -p ", " --pool= [ \fIfsname\fR .] \fIpool\fR
138 Limit the usage to report only MDTs and OSTs that are in the specified
139 .IR pool .
140 If multiple filesystems are mounted, list OSTs in
141 .I pool
142 for every filesystem, or limit the display to only a pool for a
143 specific filesystem if
144 .I fsname.pool
145 is given.  Specifying both the fsname and pool like:
146 .br
147 .BI "lfs df --pool=" fsname.pool
148 .br
149 is equivalent to specifying the mountpoint for the given
150 .IR fsname :
151 .br
152 .BI "lfs df --pool=" "pool /mnt/fsname"
153 .TP
154 .BR -v ", " --verbose
155 Show deactivated MDTs and OSTs in the listing, along with any
156 additional status flags for each MDT and OST.  By default, any
157 MDTs and OSTs that are deactivated by the administrator are not shown.
158 However, targets that are only temporarily inaccessible are still shown.
159 .SH EXAMPLES
160 .TP
161 .B $ lfs df -hv /mnt/testfs
162 Lists space usage per OST and MDT for the
163 .B testfs
164 filesystem in human readable format.
165 .PP
166 .RS 0.75i
167 UUID                 bytes  Used   Avail Use% Mounted on
168 .br
169 testfs-MDT0000_UUID  13.0G  1.2G   11.0G  10% /testfs[MDT:0]
170 .br
171 testfs-OST0000_UUID   3.6T  2.9T  585.7G  84% /testfs[OST:0]
172 .br
173 testfs-OST0001_UUID   3.6T  3.1T  472.5G  87% /testfs[OST:1] D
174 .br
175 testfs-OST0002_UUID   3.6T  3.0T  570.3G  84% /testfs[OST:2] DR
176 .br
177 OST0003           : inactive device
178 .br
179 testfs-OST0006_UUID   5.4T  4.9T  417.8G  92% /testfs[OST:3]
180 .br
181
182 filesystem_summary:  16.2T 13.8T    2.0T  88% /testfs
183 .br
184 .RE
185 .PP
186 The above example output shows that
187 .B OST0003
188 is currently temporarily inactive or offline, while
189 .B OST0004
190 and
191 .B OST0005
192 are not shown at all, either because they are marked permanently offline
193 by the administrator (via
194 .BR "lctl set_param -P osc.testfs-OST000[45].active=0" )
195 or they were never added to the filesystem.  The
196 .B testfs-OST0001
197 and
198 .B testfs-OST0002
199 targets are currently marked
200 .BR D egraded
201 (perhaps they both share the same underlying storage controller),
202 while
203 .B testfs-OST0002
204 is also marked
205 .BR R ead-only,
206 after detecting non-recoverable corruption in the backing filesystem.
207 .TP
208 .B $ lfs df -iH
209 List inode usage per OST and MDT for all mounted Lustre filesystems.
210 .RS 0.75i
211 UUID                Inodes  IUsed  IFree IUse% Mounted on
212 .br
213 testfs-MDT0000_UUID 932.2k 884.6k  47.6k  95% /testfs[MDT:0]
214 .br
215 testfs-OST0000_UUID 267.5k 179.6k  87.8k  67% /testfs[OST:0]
216 .br
217 testfs-OST0001_UUID 268.9k 173.5k  95.4k  64% /testfs[OST:1] D
218 .br
219 testfs-OST0002_UUID 267.5k 169.6k  97.9k  63% /testfs[OST:2] DR
220 .br
221 OST0003           : inactive device
222 .br
223 testfs-OST0006_UUID 426.1k 377.4k  48.7k  88% /testfs[OST:3]
224 .br
225
226 filesystem_summary: 932.1k 884.6k  47.6k  95% /testfs
227 .br
228 .RE
229 .TP
230 .B $ lfs df --pool ssd /mnt/testfs
231 List space usage for only the
232 .B ssd
233 pool of the
234 .B testfs
235 filesystem.
236 .TP
237 .B $ lfs df -v /mnt/testfs
238 List all MDTs and OSTs for the
239 .B testfs
240 filesystem, even if not currently connected.
241 .SH SEE ALSO
242 .BR lfs (1),
243 .BR lustre (7)