<p>I'm deploying rook-ceph into a minikube cluster. Everything seems to be working. I added 3 unformatted disk to the vm and its connected. The problem that im having is when I run ceph status, I get a health warm message that tells me &quot;1 pg undersized&quot;. How exactly do I fix this?</p>
<p>The documentation(<a href="https://docs.ceph.com/docs/mimic/rados/troubleshooting/troubleshooting-pg/" rel="nofollow noreferrer">https://docs.ceph.com/docs/mimic/rados/troubleshooting/troubleshooting-pg/</a>) stated &quot;<em>If you are trying to create a cluster on a single node, you must change the default of the osd crush chooseleaf type setting from 1 (meaning host or node) to 0 (meaning osd) in your Ceph configuration file before you create your monitors and OSDs.</em>&quot;  I don't know where to make this configuration but if there's any other way to fix this that I should know of, please let me know. Thanks!</p>

Xcer
<p>I came across this problem installing ceph using rook (v1.5.7) with a single data bearing host having multiple OSDs.</p>
<p>The install shipped with a default <a href="https://docs.ceph.com/en/latest/rados/operations/crush-map/" rel="noreferrer">CRUSH</a> <a href="https://docs.ceph.com/en/latest/rados/operations/crush-map/#rules" rel="noreferrer">rule</a> <code>replicated_rule</code> which had <code>host</code> as the default failure domain:</p>
<pre><code>$ ceph osd crush rule dump replicated_rule    
{
    &quot;rule_id&quot;: 0,
    &quot;rule_name&quot;: &quot;replicated_rule&quot;,
    &quot;ruleset&quot;: 0,
    &quot;type&quot;: 1,
    &quot;min_size&quot;: 1,
    &quot;max_size&quot;: 10,
    &quot;steps&quot;: [
        {
            &quot;op&quot;: &quot;take&quot;,
            &quot;item&quot;: -1,
            &quot;item_name&quot;: &quot;default&quot;
        },
        {
            &quot;op&quot;: &quot;chooseleaf_firstn&quot;,
            &quot;num&quot;: 0,
            &quot;type&quot;: &quot;host&quot;
        },
        {
            &quot;op&quot;: &quot;emit&quot;
        }
    ]
}
</code></pre>
<p>I had to find out the pool name associated with pg 1 that was &quot;undersized&quot;, luckily in a default rook-ceph install, there's only one:</p>
<pre><code>$ ceph osd pool ls
device_health_metrics

$ ceph pg ls-by-pool device_health_metrics
PG   OBJECTS  DEGRADED  ...  STATE
1.0        0         0  ...  active+undersized+remapped
</code></pre>
<p>And to confirm the pg is using the default rule:</p>
<pre><code>$ ceph osd pool get device_health_metrics crush_rule
crush_rule: replicated_rule
</code></pre>
<p>Instead of modifying the default CRUSH rule, I opted to <a href="https://docs.ceph.com/en/latest/rados/operations/crush-map/#creating-a-rule-for-a-replicated-pool" rel="noreferrer">create a new replicated rule</a>, but this time specifying the <code>osd</code> (aka <code>device</code>) <em>type</em> (<a href="https://docs.ceph.com/en/latest/rados/operations/crush-map/#types-and-buckets" rel="noreferrer">docs: CRUSH map Types and Buckets</a>), also assuming the default CRUSH root of <code>default</code>:</p>
<pre><code># osd crush rule create-replicated &lt;name&gt; &lt;root&gt; &lt;type&gt; [&lt;class&gt;]
$ ceph osd crush rule create-replicated replicated_rule_osd default osd

$ ceph osd crush rule dump replicated_rule_osd
{
    &quot;rule_id&quot;: 1,
    &quot;rule_name&quot;: &quot;replicated_rule_osd&quot;,
    &quot;ruleset&quot;: 1,
    &quot;type&quot;: 1,
    &quot;min_size&quot;: 1,
    &quot;max_size&quot;: 10,
    &quot;steps&quot;: [
        {
            &quot;op&quot;: &quot;take&quot;,
            &quot;item&quot;: -1,
            &quot;item_name&quot;: &quot;default&quot;
        },
        {
            &quot;op&quot;: &quot;choose_firstn&quot;,
            &quot;num&quot;: 0,
            &quot;type&quot;: &quot;osd&quot;
        },
        {
            &quot;op&quot;: &quot;emit&quot;
        }
    ]
}
</code></pre>
<p>And then assigning the new rule to the existing pool:</p>
<pre><code>$ ceph osd pool set device_health_metrics crush_rule replicated_rule_osd
set pool 1 crush_rule to replicated_rule_osd

$ ceph osd pool get device_health_metrics crush_rule
crush_rule: replicated_rule_osd
</code></pre>
<p>Finally confirming pg state:</p>
<pre><code>$ ceph pg ls-by-pool device_health_metrics
PG   OBJECTS  DEGRADED  ...  STATE
1.0        0         0  ...  active+clean
</code></pre>
