Skip to content

Exit Codes

FlexBlock refuses rather than guesses, and the exit code names the missing state. Every flexblock command exits with one of these codes, so scripts and systemd can tell a transient failure from one that a retry will not fix. Nearly every refusal message also names the state it found, the state it needed, and the flag that would override it.

CodeMeaningRetry?Usual remedy
0Success——
2Usage errorNoFix the command line. wipe with no terminal refuses with this code; add -y.
3Internal errorYesRetry. For detail, raise the log level with --log-level debug.
4Device I/O error on the cache device or the ublk deviceYes, after checking the deviceCheck the device. If update --device-size reports a partial resize, follow the step the message names: re-run update --device-size, or restart the daemon.
7Written by a newer buildNoUpgrade flexblock.
8Declined at the promptNoNothing to fix; run again and confirm if you meant it.
9The volume and this device disagreeNoRun show --remote. The refusal names the fix: attach the right device, --replace-ublk, or the matching grant.
10A prerequisite failed (preflight)NoFix the prerequisite. Often ublk_drv is not loaded, or the command was not run as root. Other causes include missing bucket permissions, a store that does not enforce conditional writes, and memory (see --allow-overmemory).
11No flexBlock cache on this device, or no volume at the prefixNoThe device was never attached, or a different device was named. Run attach, or init, first.
12Busy: a daemon is servingNoFind the daemon with show, which reports its PID, and stop it with SIGINT if it should not be running.
13Owned elsewhereNoDetach it on the owning host first, or give up a superseded cache with detach --allow-dirty-loss. Ownership keeps two hosts off one volume.
14Object storage errorYesRetry. Check flexblock_obj_errors_total and flexblock_obj_retries_total for a bucket problem.
15Refused as unsafeNoThe message names an override flag when one exists. Use it only once you understand what it discards.
16Not cleanly stopped. Also returned by start when a stop runs out of --shutdown-flush-timeout with data left, or a queue thread fails.YesRun start to recover, then stop it with SIGINT; raise --shutdown-flush-timeout if the flush ran out of time.
17LicenseNoCheck --grant-file and install a valid grant. An expired grant still serves, throttled.
18The prefix already holds dataNoUse a different prefix, or if the objects are a dead flexBlock volume, wipe --allow-unverified with that grant. Nothing overrides this check.

The systemd unit lists the non-retryable codes start can return in RestartPreventExitStatus, so systemd does not loop on failures a restart cannot fix. See Running Under systemd.