You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
5.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ZFS NAS Box, Part 2 | tait.tech</title>
<link rel="stylesheet" href="/assets/css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Tait Hoyem">
<meta name="keywords" content="">
<meta name="description" content="How to get ZFS working on a Linux machine and how to try it yourself!">
</head>
<body>
<div id="wrapper">
<header>
<h1>tait.tech</h1>
<nav>
<a href="/" class="nav-link" >Home</a>
<a href="/blog/" class="nav-link" >Blog</a>
<a href="/ideas/" class="nav-link" >Ideas</a>
<a href="/links/" class="nav-link" >Links</a>
<a href="https://github.com/TTWNO/" class="nav-link" target="_blank" rel="noopener noreferrer" >Github</a>
</nav>
</header>
<main>
<article>
<header>
<h1 class="post-title">ZFS NAS Box, Part 2</h1>
<time datetime="20-11-15" class="post-date">Sunday, November 15 2020</time>
</header>
<hr>
<p>Back in <a href="/2020/04/12/nas1/">part one of my NAS project</a> I discussed how I wanted to set up my hardware.
Today, I set up the NAS (almost).</p>
<p>There were some hiccup along the way, like learning that M.2 slots can disable some of your SATA ports or waiting a month for a host bus adapter to come in from China.</p>
<h2 id="why-did-it-take-so-long">Why Did It Take So Long</h2>
<p>So it turns out I was going to spend a lot more on this project than I originally anticipated.
I ended up getting a server machine instead of a sleek NAS box.
Here are some of the quick specs:</p>
<ul>
<li>Standard ATX case by Thermaltake.</li>
<li>LSI 9211-8i.</li>
<li>The cheapest HDMI graphics card I could find on Kijiji.</li>
<li>6x 3TB Segate HDDs.</li>
<li>1x 250G Kingston SSD.</li>
<li>AMD Ryzen 5 3600.</li>
<li>MSI B450 Gaming Plus Max.</li>
<li>2x 8GB FlareX 3200Mhz RAM.</li>
<li>1x 16GB Kingston 3200Mhz RAM.</li>
</ul>
<h2 id="zfs">ZFS</h2>
<p>This is how I decided to configure my storage pools.
In hindsight, this was not the best choice for upgrading.
I may change it in the future to a 0+1 setup, but it works for now.</p>
<p>I have 5x 3TB in a RAIDZ2 with one drive not attached for redundancys sake.
How does one setup a ZFS pool. Check this out:</p>
<pre class="terminal">
# zpool create poolname raidz2 \
/dev/by-id/blahblahblah1 \
/dev/by-id/blahblahblah2 \
/dev/by-id/blahblahblah3 \
/dev/by-id/blahblahblah4 \
/dev/by-id/blahblahblah5
</pre>
<p>And zippidy-doo! Weve got a ZFS pool!
We can check its status with <code class="language-plaintext highlighter-rouge">zpool status</code>.</p>
<pre class="terminal">
$ zfs status
pool: raid
state: ONLINE
scan: scrub in progress since Wed Nov 18 18:41:41 2020
1.84T scanned at 8.51G/s, 121G issued at 562M/s, 1.84T total
0B repaired, 6.45% done, 0 days 00:53:25 to go
config:
NAME STATE READ WRITE CKSUM
raid ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JTNMYY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JVSXTY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXAS8Y ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXBARY ONLINE 0 0 0
ata-HGST_HUS724030ALA640_PN2234P8JXP77Y ONLINE 0 0 0
errors: No known data errors
</pre>
<p>I had run a scrub right before this, so theres some extra detail in that.
This is really fun! I will be doing more home storage projects soon.
Perhaps Raspberry Pi NAS using all 4 USB ports to load SATA drives on it.
Now that would be fun!</p>
<h2 id="so-i-kinda-have-a-nas-now">So I Kinda Have A NAS Now…?</h2>
<p>So right now I can only copy files with <code class="language-plaintext highlighter-rouge">rsync</code>, <code class="language-plaintext highlighter-rouge">scp</code> and moving data via a physical drive.
The one major disadvantage this has is speed.</p>
<p>Due to this machine being connected directly outside my network and pulling DHCP like a normal router would, I need to send my data through the WAN connection to get my files to it.
This is rather unfortunate as my upload speed is capped at 20 megabits per second, despite my upload being in the 300+ range.</p>
<p>Part 3 will involve a LAN card so I can connect both to the DHCP server of my ISP and my local router.
This way my transfer speeds should be in the range of 1 gigabit per second.
This will make my life much easier, at least on the local network.</p>
<h2 id="fun-fact">Fun Fact!</h2>
<p>Do not try to use the M.2 slot on a consumer motherboard where you are also using all the SATA ports.
On my consumer gaming motherboard, the SATA ports next to the M.2 slot became <em>disabled</em> when I attached the M.2 SSD.
I found this out form my motherboard documentation, which I read only after a week of thinking my motherboard itself was defective, and sending it in for repairs that did absolutely nothing.</p>
<h2 id="thoughts">Thoughts</h2>
<p>I like having all this space. I plan on using it up pretty fast, so Im already looking at how to expand.
Hopefully that gives a decent overview of how I set up my drives.</p>
<p>Happy hacking!</p>
</article>
</main>
<hr>
<footer>
This page will be mirrored on <a href="https://beta.tait.tech/2020/11/15/nas2/">beta.tait.tech</a>.
</footer>
</div>
</body>
</html>