Whamcloud - gitweb
LU-9303 doc: man pages for snapshot components
[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{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{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.
58 .TP
59 .B barrier_rescan \fR{fsname} [timeout]
60 .br
61 Scan the system to check which MDTs are active. The status of the MDTs is
62 required because the
63 .B barrier_freeze
64 will be unsuccessful if any of the MDTs are permenantly offline. During
65 the rescan, the MDT status is updated. If an MDT does not respond the
66 .B barrier_rescan
67 within the given
68 .I timeout
69 seconds (where the default value is 30 seconds), then it will be marked
70 as unavailable or inactive.
71
72 .SH AVAILABILITY
73 .B lctl-barrier
74 is part of the
75 .BR lustre (7)
76 filesystem package.
77 .SH SEE ALSO
78 .BR lctl (8),
79 .BR lctl-snapshot-create (8)