<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>ZFS &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/zfs/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Sun, 02 Apr 2023 12:37:43 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>ZFS &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[ZFS - how to use a file as a ZIL]]></title>
		<link>https://shkspr.mobi/blog/2023/04/zfs-how-to-use-a-file-as-a-zil/</link>
					<comments>https://shkspr.mobi/blog/2023/04/zfs-how-to-use-a-file-as-a-zil/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 16 Apr 2023 11:34:51 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ZFS]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=45518</guid>

					<description><![CDATA[ZFS sometimes benefits from having a logging drive. Usually, you need to assign a whole device or partition to it. Unfortunately, I had already partitioned my SSD and didn&#039;t feel like repartitioning it.  So, here&#039;s how to create a file, mount it as a loopback, and then assign it to your ZFS pool as a logging drive.   Create a 1GB file somewhere on your SSD:   fallocate -l 1G zil.img  Mount the…]]></description>
										<content:encoded><![CDATA[<p>ZFS sometimes benefits from having a logging drive. Usually, you need to assign a whole device or partition to it. Unfortunately, I had already partitioned my SSD and didn't feel like repartitioning it.</p>

<p>So, here's how to create a file, mount it as a loopback, and then assign it to your ZFS pool as a logging drive.</p>

<ol>
<li>Create a 1GB file somewhere on your SSD:

<ul>
<li><code>fallocate -l 1G zil.img</code></li>
</ul></li>
<li>Mount the file as a loopback device:

<ul>
<li><code>sudo losetup -fP zil.img</code></li>
</ul></li>
<li>Find the name of the new loopback device:

<ul>
<li><code>losetup -a</code></li>
</ul></li>
<li>Add the new loopback device to your pool:

<ul>
<li><code>sudo zpool add your_pool log /dev/loop123</code></li>
</ul></li>
<li>Wait a few moments and then check it has been added using:

<ul>
<li><code>zpool status</code></li>
</ul></li>
<li>Note - the loop won't be recreated after a reboot, so your ZFS will be a bit grumpy.  Remove it with:

<ul>
<li><code>sudo zpool remove data loop123</code></li>
</ul></li>
</ol>

<p>Is there any point in doing this? No, not really. In my brief experiments it didn't make any appreciable different to the speed of my writes. Your use-case may be different though.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=45518&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/04/zfs-how-to-use-a-file-as-a-zil/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
