<?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 Taras&#39; Blog on AI, Perf, Hacks</title>
    <link>/tags/zfs/</link>
    <description>Recent content in Zfs on Taras&#39; Blog on AI, Perf, Hacks</description>
    <image>
      <title>Taras&#39; Blog on AI, Perf, Hacks</title>
      <url>/images/papermod-cover.png</url>
      <link>/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.147.0</generator>
    <language>en</language>
    <copyright>Taras Glek</copyright>
    <lastBuildDate>Sun, 10 Jul 2022 12:25:59 +0300</lastBuildDate>
    <atom:link href="/tags/zfs/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Curious Case of Maintaining Sufficient Free Space with ZFS</title>
      <link>/posts/curious-case-of-maintaining-sufficient-free-space-with-zfs/</link>
      <pubDate>Sun, 10 Jul 2022 12:25:59 +0300</pubDate>
      <guid>/posts/curious-case-of-maintaining-sufficient-free-space-with-zfs/</guid>
      <description>&lt;p&gt;TLDR: ZFS free-space reporting is a lagging indicator.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;hard drive in space&#34; loading=&#34;lazy&#34; src=&#34;/images/hard-disk-in-space.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;I use &lt;a href=&#34;https://www.proxmox.com/en/&#34;&gt;Proxmox&lt;/a&gt; VM server backed by a &lt;a href=&#34;https://en.wikipedia.org/wiki/ZFS&#34;&gt;ZFS&lt;/a&gt; array of hard drives for various personal infrastructure. I also have security cameras that upload motion-triggered videos to my server (via FTP!).&lt;/p&gt;
&lt;h2 id=&#34;problem-description&#34;&gt;Problem Description&lt;/h2&gt;
&lt;p&gt;I would like to use 90% of my available space for most-recent security videos.&lt;/p&gt;
&lt;p&gt;Recipe:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a dedicated ZFS volume&lt;/li&gt;
&lt;li&gt;Setup &lt;a href=&#34;https://linuxhint.com/setup-zfs-quotas-reservations/&#34;&gt;ZFS quota&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Run a cronjob to free space faster than it gets consumed by video uploads.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I set out to find a decent disk-freeing solution. I eventually settled on a python &lt;a href=&#34;https://github.com/fphammerle/free-disk&#34;&gt;free-disk&lt;/a&gt;. (Most of these utils were written in bash, didn&amp;rsquo;t want to disk having to grasp &amp;amp; modify write-only code).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
