<?xml version="1.0" encoding="UTF-8"?><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>s3fs &#8211; xyze.co.uk</title>
	<atom:link href="https://www.xyze.co.uk/tag/s3fs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.xyze.co.uk</link>
	<description>Sysadmin stuff</description>
	<lastBuildDate>Tue, 27 May 2025 13:12:22 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.3</generator>
	<item>
		<title>Fuse using JuiceFS</title>
		<link>https://www.xyze.co.uk/fuse-using-juicefs/</link>
					<comments>https://www.xyze.co.uk/fuse-using-juicefs/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 26 May 2025 17:12:17 +0000</pubDate>
				<category><![CDATA[cloud]]></category>
		<category><![CDATA[Contents]]></category>
		<category><![CDATA[juicefs]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[s3fs]]></category>
		<guid isPermaLink="false">https://www.xyze.co.uk/?p=125</guid>

					<description><![CDATA[I set up website hosting for a friend &#8211; this time using nginx. This was set up in a similar fashion to Caddy except I installed nginx instead of Caddy. The challenge was to get it shoehorned into one of Google Cloud Engine&#8217;s e2-micros. Most of the site was static so could be served from ... <a title="Fuse using JuiceFS" class="read-more" href="https://www.xyze.co.uk/fuse-using-juicefs/" aria-label="Read more about Fuse using JuiceFS">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>I set up website hosting for a friend &#8211; this time using nginx. This was set up in a similar fashion to Caddy except I installed nginx instead of Caddy.</p>
<p>The challenge was to get it shoehorned into one of Google Cloud Engine&#8217;s e2-micros. Most of the site was static so could be served from Cloudflare, but there were too many images so I decided to offload them onto an AWS bucket and mount using s3fs fuse. Unfortunately s3fs is very slow and searching for alternatives I happened upon JuiceFS.</p>
<p>In common with a lot of open source projects they offer a community edition which can be used for free and is extensively documented here: https://juicefs.com/docs/community/introduction/</p>
<p>Installation is detailed here: https://juicefs.com/docs/community/getting-started/installation and I installed via their PPA:</p>
<pre>sudo apt install software-properties-common
sudo add-apt-repository ppa:juicefs/ppa
sudo apt install juicefs
sudo ln -s /usr/bin/juicefs /usr/local/bin/
</pre>
<p>I then formatted my aws s3 storage using: https://juicefs.com/docs/community/getting-started/standalone#hands-on-practice-2</p>
<pre># Replace relevant options with the actual object storage being used
juicefs format --storage s3 \
    --bucket https://myjfs.s3.us-west-1.amazonaws.com \
    --access-key ABCDEFGHIJKLMNopqXYZ \
    --secret-key ZYXwvutsrqpoNMLkJiHgfeDCBA \
    sqlite3://myjfs.db myjfs
</pre>
<p>Unfortunately sqlite kept crashing so I installed redis for the metadata storage. Fortunately you can reconfigure your metadata storage without having to reformat s3: https://juicefs.com/docs/community/metadata_dump_load#recovery-and-migration</p>
<pre>
apt install redis-server
juicefs dump sqlite3://myjfs.db meta-dump
juicefs load redis://127.0.0.1:6379 meta-dump
juicefs config --storage s3 --bucket https://myjfs.s3.us-west-1.amazonaws.com --access-key ABCDEFGHIJKLMNopqXYZ --secret-key ZYXwvutsrqpoNMLkJiHgfeDCBA redis://127.0.0.1:6379
</pre>
<p>It can generate an fstab entry which is nice:</p>
<pre>juicefs mount --update-fstab --cache-size 2048 --cache-partial-only redis://127.0.0.1:6379 /var/www/html/wordpress/wp-content/uploads/
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.xyze.co.uk/fuse-using-juicefs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
