Whamcloud - gitweb
LU-13004 ptlrpc: Allow BULK_BUF_KIOV to accept a kvec
[fs/lustre-release.git] / lustre / doc / lctl-barrier.8
1 .TH lctl-barrier 8 "2017 Apr 13" Lustre "Lustre write barrier on all MDTs"
2 .SH SYNOPSIS
3 .br
4 .B lctl barrier_freeze \fR{fsname} [timeout]
5 .br
6 .br
7 .B lctl barrier_thaw \fR{fsname}
8 .br
9 .br
10 .B lctl barrier_stat \fR[--state|-s] [--timeout|-t] {fsname}
11 .br
12 .br
13 .B lctl barrier_rescan \fR{fsname} [timeout]
14 .br
15 .SH DESCRIPTION
16 .TP
17 .B barrier_freeze \fR{fsname} [timeout]
18 Set write barrier on all MDTs. The command will not return until the
19 barrier is set (frozen) or failed. With the write barrier set, any
20 subsequent metadata modification will be blocked until the barrier is
21 thawed or expired. The barrier lifetime is started when triggering
22 freeze and will be terminated when barrier thawed. To avoid the system
23 being frozen for very long time if miss/fail to call barrier_thaw, you
24 can specify its lifetime via the
25 .I timeout
26 parameter in seconds, the default value is 30 (seconds). If the barrier
27 is not thawed before that, it will be expired automatically. The command
28 can only succeed when all registered MDTs are available. If some MDT is
29 registered but goes offline, then the freeze command will fail. To check
30 and update current status of MDTs, see the command
31 .B barrier_rescan
32 in subsequent section.
33 .TP
34 .B barrier_thaw \fR{fsname}
35 Reset write barrier on all MDTs. After the write barrier thawed, all the
36 blocked metadata modifications (because of the former
37 .B barrier_freeze
38 command) will be handled normally.
39 .TP
40 .B barrier_stat \fR[--state|-s] [--timeout|-t] {fsname}
41 .br
42 Query the write barrier status, the possible status and related meanings are
43 as following:
44 .br
45   'init': has never set barrier on the system
46   'freezing_p1': in the first stage of setting the write barrier
47   'freezing_p2': in the second stage of setting the write barrier
48   'frozen': the write barrier has been set successfully
49   'thawing': in thawing the write barrier
50   'thawed': the write barrier has been thawed
51   'failed': fail to set write barrier
52   'expired': the write barrier is expired
53   'rescan': in scanning the MDTs status, see the command barrier_rescan
54   'unknown': other cases
55 .br
56 If the barrier is in 'freezing_p1', 'freezing_p2' or 'frozen' status, then
57 the lifetime remaining will be returned also. If no option is specified,
58 or both "-s" and "-t" options are specified, then the output format is:
59
60   state: xxx
61   timeout: nnn seconds
62
63 Otherwise, only the value ('xxx' or 'nnn') corresponding to the given option
64 will be printed.
65 .TP
66 .B barrier_rescan \fR{fsname} [timeout]
67 .br
68 Scan the system to check which MDTs are active. The status of the MDTs is
69 required because the
70 .B barrier_freeze
71 will be unsuccessful if any of the MDTs are permenantly offline. During
72 the rescan, the MDT status is updated. If an MDT does not respond the
73 .B barrier_rescan
74 within the given
75 .I timeout
76 seconds (where the default value is 30 seconds), then it will be marked
77 as unavailable or inactive.
78
79 .SH AVAILABILITY
80 .B lctl-barrier
81 is part of the
82 .BR lustre (7)
83 filesystem package.
84 .SH SEE ALSO
85 .BR lctl (8),
86 .BR lctl-snapshot-create (8)