Skip to main content

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:

  1. 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

  2. Add a systemd drop-in on the template unit:

    1. Make the file /etc/systemd/system/ceph-<fsid>@.service.d/10-blkdeactivate-order.conf look like this:

      [Unit]
      After=blk-availability.service
      Wants=blk-availability.service
      RequiresMountsFor=/var/lib/ceph
    2. 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.

See Also​

  1. https://tracker.ceph.com/issues/75454