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.
99 lines
3.9 KiB
99 lines
3.9 KiB
---
|
|
title: "ZFS NAS Box, Part 2"
|
|
description: "How to get ZFS working on a Linux machine and how to try it yourself!"
|
|
layout: post
|
|
---
|
|
|
|
Back in [part one of my NAS project]({% post_url 2020-04-12-nas1 %}) I discussed how I wanted to set up my hardware.
|
|
Today, I set up the NAS (almost).
|
|
|
|
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.
|
|
|
|
## Why Did It Take So Long
|
|
|
|
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:
|
|
|
|
* Standard ATX case by Thermaltake.
|
|
* LSI 9211-8i.
|
|
* The cheapest HDMI graphics card I could find on Kijiji.
|
|
* 6x 3TB Segate HDDs.
|
|
* 1x 250G Kingston SSD.
|
|
* AMD Ryzen 5 3600.
|
|
* MSI B450 Gaming Plus Max.
|
|
* 2x 8GB FlareX 3200Mhz RAM.
|
|
* 1x 16GB Kingston 3200Mhz RAM.
|
|
|
|
## ZFS
|
|
|
|
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.
|
|
|
|
I have 5x 3TB in a RAIDZ2 with one drive not attached for redundancy's sake.
|
|
How does one setup a ZFS pool. Check this out:
|
|
|
|
<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>
|
|
|
|
And zippidy-doo! We've got a ZFS pool!
|
|
We can check its status with `zpool status`.
|
|
|
|
<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>
|
|
|
|
I had run a scrub right before this, so there's 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!
|
|
|
|
## So I Kinda Have A NAS Now...?
|
|
|
|
So right now I can only copy files with `rsync`, `scp` and moving data via a physical drive.
|
|
The one major disadvantage this has is speed.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
## Fun Fact!
|
|
|
|
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 *disabled* 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.
|
|
|
|
## Thoughts
|
|
|
|
I like having all this space. I plan on using it up pretty fast, so I'm already looking at how to expand.
|
|
Hopefully that gives a decent overview of how I set up my drives.
|
|
|
|
Happy hacking!
|