OSD Daemons Fail to Terminate Properly on Shutdown
Problem
Debian Bookworm systems do not properly terminate OSD daemons when they are shut down.
Solution
Do either of the following:
-
If your OSDs do not depend upon networked filesystems, run
systemctl mask blk-availability.service. This solution was applied in the field in 2026, and the details of its implementation can be read here: https://tracker.ceph.com/issues/75454 -
Add a systemd drop-in on the template unit:
-
Make the file
/etc/systemd/system/ceph-<fsid>@.service.d/10-blkdeactivate-order.conflook like this:[Unit]
After=blk-availability.service
Wants=blk-availability.service
RequiresMountsFor=/var/lib/ceph -
Run
systemctl daemon-reload.
-
Discussion
This occurs because the blk-availability.service systemd unit runs
/usr/sbin/blkdeactivate, and this unmounts /var/lib/ceph before the
ceph-*@osd.service service is stopped. Because the filesystem is already
unmounted, the container does not get stopped. The systemd shutdown procedure
waits until the "stop job" times out before killing the OSD.