From 3f7c5d26e6c14e4fb7575ee0b983133adf5e9a05 Mon Sep 17 00:00:00 2001 From: Fan Yong Date: Tue, 18 Oct 2016 08:36:57 +0800 Subject: [PATCH] LU-8900 doc: Lustre snapshot man page To describe how to use barrier and snapshot commands. Signed-off-by: Fan Yong Change-Id: Ia1833ddd2949aaf5b63411214310c7792b41384d Reviewed-on: https://review.whamcloud.com/24270 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Niu Yawei Reviewed-by: Oleg Drokin --- lustre/doc/lctl.8 | 257 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) diff --git a/lustre/doc/lctl.8 b/lustre/doc/lctl.8 index 896386e..c5042bd 100644 --- a/lustre/doc/lctl.8 +++ b/lustre/doc/lctl.8 @@ -377,6 +377,263 @@ Stop LFSCK on the specified MDT or OST device. .RS 4 Get the LFSCK global status via the specified MDT device. .RE +.SS BARRIER +The tools set for write (modify) barrier on all MDTs. +.TP +.B barrier_freeze \fR [timeout] +.br +Set write barrier on all MDTs. The barrier_freeze command will not return +until the barrier is set (frozen) or failed. With the write barrier set, +any subsequent metadata modification will be blocked until the barrier is +thawed or expired. The barrier lifetime is started when triggering +barrier_freeze, and will be terminated when barrier thawed. To avoid the +system being frozen for very long time if miss/fail to call barrier_thaw, +you can specify its lifetime via the 'timeout' parameter in second, the +default value is 60 (seconds). If the barrier is not thawed before that, +it will be expired automatically. +A barrier_freeze can only succeed when all registered MDTs are available. +If some MDT has ever registered but become offline, then barrier_freeze +will fail. To check and update current status of MDTs, see the command +barrier_rescan. +.TP +.B barrier_thaw \fR +.br +Reset write barrier on all MDTs. With the write barrier thawed, all blocked +metadata modifications (by the former barrier_freeze) will be handled normally. +.TP +.B barrier_stat \fR +.br +Query the write barrier status, the possible status and related meanings are +as following: +.br + 'init': has never set barrier on the system + 'freezing_p1': in the first stage of setting the write barrier + 'freezing_p2': in the second stage of setting the write barrier + 'frozen': the write barrier has been set successfully + 'thawing': in thawing the write barrier + 'thawed': the write barrier has been thawed + 'failed': fail to set write barrier + 'expired': the write barrier is expired + 'rescan': in scanning the MDTs status, see the command barrier_rescan + 'unknown': other cases +.br +If the barrier is in 'freezing_p1', 'freezing_p2' or 'frozen' status, then +the left lifetime will be returned also. +.TP +.B barrier_rescan \fR [timeout] +.br +Scan the system to check which MDTs are active. The status of the MDTs is +required because a barrier_freeze will be unsuccessful if any of the MDTs +are permenantly offline. During barrier_rescan, the MDT status is updated. +If an MDT does not respond the barrier_rescan within the given "timeout" +seconds (where the default value is 60 seconds), then it will be marked +as unavailable or inactive. + +.SS SNAPSHOT +ZFS backend based snapshot tools set. The tool loads system configuration +from the file /etc/ldev.conf on the MGS, and call related ZFS commands to +maintain Lustre snapshot pieces on all targets (MGS/MDT/OST). +The configuration file /etc/ldev.conf is not only for snapshot, but also +for other purpose. The format is: + foreign/-