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