<?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>Zfs on Details...</title>
    <link>https://www.deepreflect.net/tags/zfs/</link>
    <description>Recent content in Zfs on Details...</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Copyright © 2003 - 2026 Leonardo Rizzi</copyright>
    <lastBuildDate>Tue, 30 Jun 2026 03:28:29 +0200</lastBuildDate>
    <atom:link href="https://www.deepreflect.net/tags/zfs/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Solaris - Add swap to ZFS disk</title>
      <link>https://www.deepreflect.net/2010/02/11/solaris-add-swap-to-zfs-disk/</link>
      <pubDate>Thu, 11 Feb 2010 09:38:47 +0000</pubDate>
       <guid isPermaLink="false">http://blog.deepreflect.net/?p=814</guid> 
      <description>&lt;p&gt;I installed Solaris 10 05/09 on a machine and I used whatever the default swap space setting when I built the box. Now I need to increase the swap space and I can&amp;rsquo;t add a swap file, like was possible under UFS.&lt;/p&gt;
&lt;p&gt;If your swap device is in use, then you might not be able to delete it. Check to see if the swap area is in use. For example:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I installed Solaris 10 05/09 on a machine and I used whatever the default swap space setting when I built the box. Now I need to increase the swap space and I can&rsquo;t add a swap file, like was possible under UFS.</p>
<p>If your swap device is in use, then you might not be able to delete it. Check to see if the swap area is in use. For example:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>$ swap -l
</span></span><span style="display:flex;"><span>swapfile                 dev    swaplo   blocks     free
</span></span><span style="display:flex;"><span>/dev/zvol/dsk/rpool/swap 182,2         8  4194296  4194296
</span></span></code></pre></div><p>In the above output, blocks == free, so the swap device is not actually being used.</p>
<p>If the swap area is not is use, remove the swap area. For example:</p>
<p><code>$ swap -d /dev/zvol/dsk/rpool/swap</code></p>
<p>Confirm that the swap area is removed.</p>
<p><code>$ swap -l</code></p>
<p>No swap devices configured</p>
<p>Resize the swap volume. For example:</p>
<p><code>$ zfs set volsize=1G rpool/swap</code></p>
<p>Activate the swap area.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>$ swap -a /dev/zvol/dsk/rpool/swap` `$ swap -l
</span></span><span style="display:flex;"><span>swapfile                 dev    swaplo   blocks     free
</span></span><span style="display:flex;"><span>/dev/zvol/dsk/rpool/swap 182,2         8  2097144  2097144
</span></span></code></pre></div>]]></content:encoded>
    </item>
  </channel>
</rss>
