LCTL-BARRIER(8)

NAME
lctl-barrier - Lustre write barrier utilities

SYNOPSIS
lctl barrier_freeze FSNAME [TIMEOUT]
lctl barrier_thaw FSNAME
lctl barrier_stat [--state|-s] [--timeout|-t] FSNAME
lctl barrier_rescan FSNAME [TIMEOUT]

DESCRIPTION

barrier_freeze FSNAME [TIMEOUT]
    Set write barrier on all MDTs. The 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 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 seconds, the default value is 30 (seconds). If the barrier is not thawed before that, it will be expired automatically. The command can only succeed when all registered MDTs are available. If some MDT is registered but goes offline, then the freeze command will fail. To check and update current status of MDTs, see the command barrier_rescan in subsequent section.

barrier_thaw FSNAME
    Reset write barrier on all MDTs. After the write barrier thawed, all the blocked metadata modifications (because of the former barrier_freeze command) will be handled normally.

barrier_stat [--state|-s] [--timeout|-t] FSNAME
    Query the write barrier status, the possible status and related meanings are as following:
            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
    If the barrier is in 'freezing_p1', 'freezing_p2' or 'frozen' status, then the lifetime remaining will be returned also. If no option is specified, or both "-s" and "-t" options are specified, then the output format is:
            state: xxx
            timeout: nnn seconds
    Otherwise, only the value ('xxx' or 'nnn') corresponding to the given option will be printed.

barrier_rescan FSNAME [TIMEOUT]
    Scan the system to check which MDTs are active. The status of the MDTs is required because the barrier_freeze will be unsuccessful if any of the MDTs are permenantly offline. During the 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 30 seconds), then it will be marked as unavailable or inactive.

AVAILABILITY
lctl-barrier is part of the lustre(7) filesystem package since release 2.10.0

SEE ALSO
lctl(8), lctl-snapshot-create(8)