nas build, part 0: introduction

Sometime in – h*ck I don’t know, 2006? – I last built my personal computer.

At the time, it was a combination Serious Desktop Workhorse and File Server.

In time, I’ve replaced the former with a ${day_job}-provided machine, have relegated my personal computing to a dedicated VM isolated from those work concerns (plus devices), and the machine I had built has become a very unbalanced NAS server. It had far too much compute power (and thus baseline energy consumption) for the menial task it was left with. As well, the size of the RAID array was great at the time, but in an era of 4K video and TimeMachine backups, it’s limited.

So, I decided to replace it with a proper NAS device.

My goals were the following:

  • order-of-magnitude storage increase: the current box has 1.8TB; shooting for 18-24 T

  • a bit more redundancy: current box is RAID10, and had a regular issue with /dev/hdc initially that thankfully resolved after a few replacements. Shipping from newegg to VT is ~2d if a drive does fail, but I’d rather have 2 drive-fail capability, especially with that drive size / rebuild time.

  • serious power reduction: the previous box (old i7) drew 140W idle, and I was shooting for ~40W;

  • simplicity in OS management: the machine had been running linux-4.4.1 forever, and grub-0.99, because it’s too fragile to change and I’m a scaredy-pants

As such, the plan became:

  • 5-6 6±2 TB drives in a RAID5 or 6 or Z2 configuration

  • explicitly lower-power CPU, limited memory

  • (eventually-)read-only thumb-drive boot, OS managed via virtual machine

I want to take a moment as early as possible to recognize Brian Moses’ DIY NAS builds, which have been a significant guide for this build; by that I mean I stole his plans on the hardware side, with some minor tweaks.

I wound up with the following hardware/costs:

component description cost =2255
case SilverStone DS380B 150
psu Corsair SF450 85
motherboard ASRock Z270M-ITX 130
cpu Intel Core i5-7600T 255
memory Ballistix DDR4 2666 (2×8GB) 185
drives (a) ×3 WD Red 8TB NAS – WD80EFZX 725
drives (b) ×3 Seagate IronWolf 8TB NAS – ST8000VN0022 725

The SilverStone because of the hot-swappable drive bays.

The ASRock because of 6 SATA6 ports native.

The Core i5-7600T because of the balance of high benchmarking scores and modern features with a TDP of only 35W.

I decided to stick with Gentoo as the OS, because I love it and more importantly I’m comfortable with it.

In advance of building the new server (“earth”, to complement fire (the firewall), air (the wifi), and water (my personal VM)), I decided to at least upgrade the software side of my current server (phoenix) with a thumb-drive OS build.

So, this OS build is not only going to be the basis for the next server, but it is going to take over the current server’s OS.

I’ve leveraged UUID- and LABEL-based configuration in grub and /etc/fstab in order to have the OS image work in both the virtualized and real environments.

In particular:

In reality I have 4 1TB drives in a btrfs RAID10 configuration.

In the virtualized environment, I have 4 1GB “drives” in the same configuration.

Both mounted as “/data“, but in /etc/fstab, it’s:

    LABEL="DATA" /data btrfs defaults,noatime,compress=lzo 0 0
    /data/home /home none bind 0 0

So no matter which is booting, the same thing is mounted.

For the boot disks, it’s all:

    # /dev/sda2 /boot ext2 defaults 0 0
    UUID=563893f3-c262-4032-84ac-be12fddff66b /boot ext2 defaults 0 0
    # /dev/sda3 / ext4 noatime 0 0
    UUID=489dd7ad-a5e5-4727-8a9c-b11cca382038 / ext4 noatime 0 0

So that no matter where the image is booted (virtual, thumbdrive, whatever) the mounts work fine.

See part 1 for the next in the series.

Champlain Valley Water Quality, 2009

I missed putting up the water quality numbers from this spring, but in the mean time it turns out the Champlain Water District has the Water Quality Reports up on the web. Unfortunately, they’re huge PDFs since they seem to be simply bitmap scans of the paper report. :(

In any case, here’s the relevant homebrewer water quality details:

Aluminum0.056 mg/L
Alkalinity57-74 ppm as CaCO3
Calcium Hardness45-56 ppm as CaCO3
Total Hardness61 ppm as CaCO3 (3.6 grains/gal)
Chloride17 ppm
Foaming Agentsless than 0.1ppm
Total Organic Carbon (TOC)2.10 ppm (1.49-2.74)
Conductivity182 µS/cm (158-202)
pH7.66 (7.4-7.94)
Total Dissolved Solids113 ppm
Ironless than 0.01ppm
Manganese.006 mg/L (0 – 0.023)
Potassium1.31 ppm
Sulfate15 ppm
Silverless than 0.005 ppm
Silica1.4 ppm
Silicon0.67 ppm
Bromideless tahn 0.010 ppm
Iodideless than 1 ppm
Flouride0.96 mg/L (0.71 – 1.19)
Ammonium Ion0.12 ppm (0.02-0.23)

mysql[-bin]-5.1.40 ebuild

I had a pressing need for mysql-5.1.40 to be installed for work reasons a couple of weeks ago, and found the state of mysql releases in gentoo to be lacking. I cobbled together the following ebuild using the binary RPM distribution from It should probably be called “mysql-bin”, but whatever.

inherit eutils rpm
src_install() {
    dobin usr/bin/*
    dosbin usr/sbin/*
    dolib usr/lib64/*
    insinto /usr/include/mysql
    doins usr/include/mysql/*
    insinto /usr/share/aclocal/mysql
    doins usr/share/aclocal/mysql.m4
    dodoc usr/share/doc/MySQL-server-5.1.40/*
    doman usr/share/man/man1/*
    doman usr/share/man/man8/*
    insinto /usr/share/mysql
    doins usr/share/mysql/*
    insinto /usr/share/mysql/charsets
    doins usr/share/mysql/charsets/*
    insinto /usr/share/mysql/english
    doins usr/share/mysql/english/*

Champlain Valley water analysis, Spring 2008

As a South Burlington homeowner (water-bill-payer, really), the Champlain Water District sends me a report about how their water is the best water. Of note to me as a homebrewer is the analysis of certain chemical properties of the water. Since a few google searches for this information basically turned up my previous post and not the actual source of the data, here’s the data:

  • aluminum: < 0.06ppm
  • color: 2 units
  • alkalinity: 57-74 ppm as CaCO3
  • calcium hardness: 45-56 ppm as CaCO3
  • total hardness: 61 ppm as CaCO3
  • chloride: 17ppm
  • foaming agents: < 0.1 ppm
  • total organic carbon: 2.04 pm (1.49-2.61)
  • conductivity: 192 micro-S/cm (156-194)
  • pH: 7.62 (7.39-7.79)

  • total disolved solids: 113 ppm

  • iron: < 0.01ppm
  • manganese: .007ppm
  • sodium: 7.5ppm
  • potassium: 1.31 ppm
  • sulfate: 15 ppm
  • silver: < 0.05ppm
  • silica: 1.4ppm
  • silicon: 0.67 ppm
  • bromide: < 0.010 ppm
  • iodide: < 1 ppm
  • flouride: 1.01 ppm (0.74 – 1.28)
  • ammonium ion: 0.15 ppm (0.01 – 0.32)