Skip to content

Where Data Can Be Lost

Everything in flexBlock is designed to refuse rather than lose data. This page lists the exceptions: the few commands that discard data on purpose, and the one hardware event that costs acknowledged writes. Read it before you run any command with an override flag.

A write is acknowledged once it is durable on the cache device. The chunk is then dirty: it exists only on the cache device until the flush loop uploads it to the bucket. Anything that throws away a cache holding dirty chunks throws away those writes.

Watch flexblock_cache_dirty_slots and flexblock_discard_deletes_pending. When both read 0, the bucket holds everything, and the cache can be discarded safely.

Three commands discard a cache’s dirty data. All three require a flag as confirmation instead of prompting, so that a script cannot answer a prompt by accident.

Each of these commands accepts --dry-run, which prints what would happen without doing it.

A failed cache device is the one hardware event that costs acknowledged writes: at most what flexblock_cache_oldest_dirty_age_seconds reported at the time.

This matters most on ephemeral instance storage, whose contents vanish when the instance stops or is replaced. The cache needs no durability of its own, since everything it holds is either already in the bucket or on its way there. What is at risk is only the write-back window:

  • With the defaults, --flush-threshold holds it to about four minutes while uploads keep up with writes, and about eight for a chunk under continuous writes (see --flush-quiet).
  • A write burst faster than the bucket absorbs, or a backlog recovered after a crash, stretches it until the backlog drains.

To shrink the window, lower --flush-threshold (at the price of more uploads), and alert when flexblock_cache_oldest_dirty_age_seconds stays high. See Write-Back Behavior and Alerting.

A replacement instance attaches the same volume, with --take-ownership if the old one could not detach, and serves it from a cold cache.

  • A daemon crash. The kernel holds the device and its in-flight requests. Run start again; it replays the write-ahead log and resumes. See Recovering From a Crash.
  • A shutdown that runs out of time. Dirty data not uploaded within --shutdown-flush-timeout, or left behind by a SIGKILL, stays on the cache device and the next start flushes it.
  • A license expiry. Guest I/O is throttled, but flushing to object storage is not, and data can still be read out. See Licensing.