Leaked Kernel Devices
When a daemon dies, it leaves its ublk device quiesced in the kernel so the next start can recover it. Usually that is exactly what you want. Sometimes it is not:
- You want different geometry or write durability than the leftover device was created with.
- The device belongs to a volume that no longer exists.
In those cases the leftover device makes start refuse, and the refusal says why (for example, a leftover device with different geometry, exit code 9).
Remove it with reap
Section titled “Remove it with reap”reap removes a ublk device by id. It touches only the kernel’s registration of the device: nothing on the cache device or in the bucket. Ids are bare numbers, so reap 0 acts on /dev/ublkb0.
ls /dev/ublkb*sudo flexblock reap 0Then run start again.
If the point is only to change geometry or write durability for the same volume, start --replace-ublk does the same job in one step. Either way, the in-flight requests the kernel was holding are not reissued.
| Flag | Meaning |
|---|---|
--allow-live | Reap a device a daemon is still serving. Prompts unless -y is given. |
--dry-run | Print what would be reaped and exit. |
-y, --yes | Skip the confirmation prompt. |
Devices still being served
Section titled “Devices still being served”reap refuses a device a daemon is serving (exit code 12). --allow-live overrides that and prompts, but it pulls the block device out from under its users.