<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Rbd on inetshell</title><link>https://inet.sh/en/tags/rbd/</link><description>Recent content in Rbd on inetshell</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 25 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://inet.sh/en/tags/rbd/index.xml" rel="self" type="application/rss+xml"/><item><title>Ceph on Proxmox: clearing the 'daemons have recently crashed' HEALTH_WARN and deleting orphaned VM disks in RBD</title><link>https://inet.sh/en/posts/proxmox/ceph-crash-archive-orphaned-rbd/</link><pubDate>Fri, 25 Sep 2026 00:00:00 +0000</pubDate><guid>https://inet.sh/en/posts/proxmox/ceph-crash-archive-orphaned-rbd/</guid><description>Two routine clean-ups on a Ceph managed by Proxmox VE: archiving crashes you have already reviewed to get back to HEALTH_OK (ceph crash ls-new, info, archive-all) and finding and deleting RBD images that no longer belong to any VM (pvesm free, rbd rm, and the watchers and snapshots that block it).</description><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="c1"># HEALTH_WARN: N daemons have recently crashed</span>
</span></span><span class="line"><span class="cl">ceph crash ls-new
</span></span><span class="line"><span class="cl">ceph crash info &lt;id&gt;          <span class="c1"># which daemon, when, and the backtrace</span>
</span></span><span class="line"><span class="cl">ceph crash archive-all        <span class="c1"># the warning goes away; the crash stays in `ceph crash ls`</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Disks of a VM that no longer exists</span>
</span></span><span class="line"><span class="cl">rbd ls -l cephpool
</span></span><span class="line"><span class="cl">pvesm free cephpool:vm-124-disk-1     <span class="c1"># through the Proxmox storage layer</span>
</span></span><span class="line"><span class="cl">rbd rm cephpool/vm-124-disk-1         <span class="c1"># or straight in Ceph</span>
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="health_warn-daemons-have-recently-crashed">HEALTH_WARN: daemons have recently crashed</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">HEALTH_WARN 1 daemons have recently crashed
</span></span><span class="line"><span class="cl">[WRN] RECENT_CRASH: 1 daemons have recently crashed
</span></span><span class="line"><span class="cl">    osd.5 crashed on host pve-node2 at 2026-09-20T03:14:07.123456Z
</span></span></code></pre></td></tr></table>
</div>
</div><p>It is the <code>RECENT_CRASH</code> check from the manager&rsquo;s <code>crash</code> module: a daemon fell over, left a report, and the warning stays until an administrator <strong>archives</strong> it, or until two weeks pass (<code>mgr/crash/warn_recent_interval</code>). The daemon has almost always come back on its own; the warning does not say it is still down.</p>
<p>Before archiving, look at what it was:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">ceph crash ls-new
</span></span><span class="line"><span class="cl">ceph crash info 2026-09-20T03:14:07.123456Z_9f1c...
</span></span></code></pre></td></tr></table>
</div>
</div><p>What matters from <code>info</code> is <code>entity_name</code> (which daemon), <code>utc_timestamp</code>, <code>assert_msg</code> or <code>backtrace</code>, and <code>ceph_version</code>. Then:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">ceph osd stat                          <span class="c1"># are they all still up/in?</span>
</span></span><span class="line"><span class="cl">systemctl status ceph-osd@5            <span class="c1"># on the OSD&#39;s node</span>
</span></span><span class="line"><span class="cl">journalctl -u ceph-osd@5 --since <span class="s1">&#39;-1h&#39;</span>
</span></span><span class="line"><span class="cl">dmesg -T <span class="p">|</span> grep -iE <span class="s1">&#39;sd[a-z]|nvme|i/o error&#39;</span>
</span></span><span class="line"><span class="cl">smartctl -a /dev/sdX                   <span class="c1"># if the crash lines up with disk errors</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>With that settled, archive:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">ceph crash archive &lt;id&gt;
</span></span><span class="line"><span class="cl">ceph crash archive-all
</span></span><span class="line"><span class="cl">ceph -s                                <span class="c1"># HEALTH_OK if nothing else is going on</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Archiving fixes nothing; it only acknowledges you saw it. If the same OSD shows up in <code>ls-new</code> every few days, it is a disk or a controller, not an annoying notice: take it out of the cluster and replace it.</p>
<p>To clean the history: <code>ceph crash rm &lt;id&gt;</code> or <code>ceph crash prune &lt;days&gt;</code>. The warning can be turned off entirely with <code>ceph config set mgr mgr/crash/warn_recent_interval 0</code>, which is exactly what you do not want in production.</p>
<h2 id="orphaned-vm-disks-in-rbd">Orphaned VM disks in RBD</h2>
<p>They appear when a VM is deleted while the storage is unreachable, a clone or migration fails halfway, someone deletes the <code>.conf</code> by hand, or a restore is left incomplete. They take space and do not show in the GUI because no <code>.conf</code> mentions them.</p>
<h3 id="finding-them">Finding them</h3>
<p>Compare the pool&rsquo;s images with the <code>.conf</code> files of <strong>every</strong> node (<code>/etc/pve/nodes/</code> holds each node&rsquo;s copy):</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl"><span class="k">for</span> img in <span class="k">$(</span>rbd ls cephpool<span class="k">)</span><span class="p">;</span> <span class="k">do</span>
</span></span><span class="line"><span class="cl">  grep -rqs <span class="s2">&#34;cephpool:</span><span class="nv">$img</span><span class="s2">&#34;</span> /etc/pve/nodes/*/qemu-server /etc/pve/nodes/*/lxc <span class="se">\
</span></span></span><span class="line"><span class="cl"><span class="se"></span>    <span class="o">||</span> <span class="nb">echo</span> <span class="s2">&#34;no owner: </span><span class="nv">$img</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">done</span>
</span></span><span class="line"><span class="cl">rbd ls -l cephpool          <span class="c1"># sizes</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p><code>pvesm list cephpool</code> gives the same list with the VMID Proxmox infers from the name; handy to cross-check against <code>qm list</code> and <code>pct list</code> on each node.</p>
<h3 id="if-the-vm-still-exists">If the VM still exists</h3>
<p>Let Proxmox see it again and delete it from there:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">qm rescan --vmid <span class="m">124</span>        <span class="c1"># shows up as unused0 in the .conf</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>Then GUI → Hardware → the <em>Unused</em> disk → <strong>Remove</strong>, which does delete the image, or <code>pvesm free cephpool:vm-124-disk-1</code>. Careful: <code>qm set 124 --delete unused0</code> only drops it from the <code>.conf</code>, it deletes no data.</p>
<h3 id="if-the-vm-no-longer-exists">If the VM no longer exists</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">pvesm free cephpool:vm-124-disk-1
</span></span><span class="line"><span class="cl"><span class="c1"># direct Ceph equivalent:</span>
</span></span><span class="line"><span class="cl">rbd rm cephpool/vm-124-disk-1
</span></span></code></pre></td></tr></table>
</div>
</div><p>When <code>rbd rm</code> refuses:</p>
<table>
  <thead>
      <tr>
          <th>Message</th>
          <th>Cause</th>
          <th>Way out</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>image still has watchers</code></td>
          <td>Some process has it open (a VM running on another node, an <code>rbd map</code>)</td>
          <td><code>rbd status cephpool/vm-124-disk-1</code> says who; stop that VM or <code>rbd unmap</code></td>
      </tr>
      <tr>
          <td><code>image has snapshots</code></td>
          <td>Snapshots remain</td>
          <td><code>rbd snap purge cephpool/vm-124-disk-1</code> and retry</td>
      </tr>
      <tr>
          <td><code>cannot remove a protected snapshot</code></td>
          <td>It is a template <code>base-*</code> with clones</td>
          <td><code>rbd children cephpool/base-9000-disk-0@__base__</code>; the clones depend on it, do not delete it</td>
      </tr>
  </tbody>
</table>
<h2 id="traps">Traps</h2>
<ul>
<li><strong>Cross-check against every node</strong>, not the <code>qm list</code> of the node you are on; the disk of a VM living on another node is not an orphan.</li>
<li><strong><code>base-*</code> is not junk</strong>: those are the templates. Delete them only through <code>qm destroy</code> of the template.</li>
<li><strong>Space comes back slowly</strong>: <code>ceph df</code> takes a while to reflect the delete while the OSDs remove objects.</li>
<li><strong>A whole pool you no longer need</strong>: <code>pveceph pool destroy &lt;pool&gt; --force --remove_storages</code>; it takes everything inside with it.</li>
</ul>
<h2 id="see-also">See also</h2>
<ul>
<li><a href="/en/posts/proxmox/ceph-device-classes-crush-rules/">Ceph: device classes and CRUSH rules</a></li>
<li><a href="/en/posts/proxmox/vm-is-locked-snapshot-delete/">VM is locked (snapshot-delete)</a> — orphaned RBD snapshots show up there</li>
<li>Ceph documentation: <a href="https://docs.ceph.com/en/latest/rados/operations/health-checks/#recent-crash">Health checks — RECENT_CRASH</a></li>
</ul>
]]></content:encoded></item></channel></rss>