<?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>Recovery on inetshell</title><link>https://inet.sh/en/tags/recovery/</link><description>Recent content in Recovery on inetshell</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 19 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://inet.sh/en/tags/recovery/index.xml" rel="self" type="application/rss+xml"/><item><title>Import a ZFS pool after a power outage</title><link>https://inet.sh/en/posts/zfs/import-after-power-outage/</link><pubDate>Wed, 19 Aug 2026 00:00:00 +0000</pubDate><guid>https://inet.sh/en/posts/zfs/import-after-power-outage/</guid><description>Use zpool import -F and zpool import -f to import a dirty ZFS pool after a power cut, then scrub.</description><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2>
<p>Pool will not import after power loss: <code>zpool import -f</code>, then <code>-F</code> if you must rewind txgs, then <code>zpool scrub</code>.</p>
<p>After a power cut the pool is often still <strong>on the disks</strong> but <code>zpool status</code> is empty: it was left dirty-exported, or the host booted without it. Do not <code>zpool create</code> on those disks.</p>
<h2 id="see-what-is-there">See what is there</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></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">zpool import
</span></span></code></pre></td></tr></table>
</div>
</div><p>Lists importable pools by name (<code>VOL1</code> below) and whether they are <code>FAULTED</code> / <code>UNAVAIL</code>.</p>
<h2 id="import">Import</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></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">zpool import -f VOL1
</span></span></code></pre></td></tr></table>
</div>
</div><p><code>-f</code> means “I know it might still look imported elsewhere”. That is the usual crash case: ZFS thinks the other side still holds it.</p>
<p>If <code>-f</code> is not enough because the last txgs were half-written:</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">zpool import -F VOL1
</span></span></code></pre></td></tr></table>
</div>
</div><p><code>-F</code> <strong>rewinds</strong> to an earlier consistent txg. You can lose the last seconds of writes. That is better than a pool that will not mount.</p>
<p>Dry-run:</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">zpool import -F -n VOL1
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="afterwards-scrub">Afterwards: scrub</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></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">zpool scrub VOL1
</span></span><span class="line"><span class="cl">zpool status VOL1
</span></span></code></pre></td></tr></table>
</div>
</div><p>Scrub confirms the rewind did not leave checksum errors. Let it finish before you delete “just in case” snapshots.</p>
<h2 id="do-not">Do not</h2>
<ul>
<li><code>zpool create</code> on the same <code>sdX</code> devices wipes the labels.</li>
<li><code>-F</code> is not the first knob: try <code>-f</code> first.</li>
<li>If the pool is the root (<code>rpool</code> / Proxmox <code>bpool</code>), import from live media, not from the system that will not boot.</li>
</ul>
<p>See also: <a href="/en/posts/zfs/replace-disks/">replacing disks</a>, <a href="/en/posts/zfs/basic-commands/">basic commands</a>.</p>
]]></content:encoded></item></channel></rss>