Skip to content

Recovering From a Crash

If the flexBlock daemon dies, the kernel does not fail I/O to the block device. It quiesces the device and holds requests until a daemon returns. A mounted filesystem blocks, and umount hangs and cannot be interrupted.

That is by design: it is what makes a daemon crash survivable. The fix is to bring a daemon back.

Run start on the same cache device before touching anything mounted on it.

Terminal window
sudo flexblock start /dev/nvme1n1p1

start detects the unclean stop and then:

  1. Replays the write-ahead log.
  2. Recovers the existing /dev/ublkbN, with the kernel reissuing the requests that were in flight.
  3. Resumes serving. The blocked I/O drains and the filesystem carries on.

Under the systemd template, this happens on its own: the service restarts ten seconds after a crash and start recovers the device.

--replace-ublk deletes the leftover ublk device and attaches a fresh one instead of recovering it. Use it only when recovery is refused, for example because you want to change geometry or write durability, since it forfeits the reissue of in-flight requests.

Terminal window
sudo flexblock start /dev/nvme1n1p1 --replace-ublk

If the leftover device belongs to a volume that no longer exists, see Leaked Kernel Devices.