‹ BackHN Continuity

Thread

Custom home server built from spare parts

91 points · 54 comments · sotilrac

  1. drnick1 · · focus · HN ↗
    > So the NAS runs Kubuntu 24.04 with ZFS

    My experience is similar. I no longer use dedicated NAS, firewall, or other exotic distributions. I run plain Debian, and add what I need through standard repo packages. My "NAS" is simply a Samba daemon. The same box runs countless other services including hostapd (WiFi), DNS (Unbound), an email stack (Postfix/Dovecot), multiple game servers, and Podman.

    > everything else in Docker Compose

    I would suggest Podman instead. It is far more secure by design (rootless) and is unable to silently alter the firewall's configuration.

    1. Gigachad · · focus · HN ↗
      These days you can buy 4 bay USB-C hard drive enclosures which let you make a nas out of any mini pc. I 3D printed a 10 inch rack to put the mini pc, hard drive enclosure and switch in which keeps it all neat and looks kinda cool.
      1. magarnicle · · focus · HN ↗
        I do a similar thing. It really is functionally exactly the same, just a bit more piecemeal.
      2. drnick1 · · focus · HN ↗
        Why not an old school case with an HDD cage that can hold anywhere between a few and a dozen drives? It would be cheaper and more flexible.
        1. rkagerer · · focus · HN ↗
          Or even go nuts and do something like this: <a href="https:&#x2F;&#x2F;grabcad.com&#x2F;library&#x2F;10-bay-hard-disk-drive-cage-for-phanteks-enthoo-primo-case-1" rel="nofollow">https:&#x2F;&#x2F;grabcad.com&#x2F;library&#x2F;10-bay-hard-disk-drive-cage-for-...
      3. M95D · · focus · HN ↗
        USB is unreliable.

        I used btrfs raid0 on USB drives for more than a year. Every month or so, a drive would disconnect from the bus and immediately redetected as another device (sde-&gt;sdf). Btrfs does not auto-recover from this. The choices are 1) reboot and scrub, which recovers the missing drive without doing a full resync, but it needs a reboot (any hosted site is offline for 3 minutes) and scrub takes a long time reading in the background, or 2) run btrfs replace which doesn&#x27;t need a reboot, but the full resync takes even longer than a scrub and increases wear if it&#x27;s a ssd because it wipes everything and writes all data again.

        1. dsr_ · · focus · HN ↗
          I agree that USB is unreliable.

          I will point out that if you use ZFS instead of btrfs, you can specify drives to be detected via their serial number names rather than their attachment points, so a reconnect will not require a reboot.

          Still, don&#x27;t depend on USB for anything meant to be permanently connected.

          1. doubled112 · · focus · HN ↗
            USB is unreliable but it&#x27;s working for me. I&#x27;ve had zero disconnects in a couple of years of using a Terramaster USB-C DAS. I&#x27;ve heard of the problems enough I&#x27;ve even searched logs for it.

            I&#x27;ve wondered if my experience is different because I&#x27;m using single disks (but still ZFS) instead of any RAID. There is rarely transfer happening across all of the disks.

            1. M95D · · focus · HN ↗
              Can&#x27;t say. The power source for the drives is also important. I do use a USB 2.5&quot; HDD without an external power source for one of the SBCs I have, and that&#x27;s stable, but that SBC is powered directly from the GPIO pins, not USB.

              Unfortunately, where I need it the most - the router which is also a NAS - can&#x27;t use directly-powered USB HDDs. Not enough ports. I had to use a hub. I tried 4 models, two self-powered and two powered by router&#x27;s USB, and none of them was stable. I also tried 3 models of USB-SATA adapters. Two self-powered, one powered by hub (connected to the hubs that had separate power - didn&#x27;t work otherwise). None of them was stable. It was always the USB-SATA adapters&#x2F;racks that disconnected, not the hubs.

              Then I bought a mPCIe 4-port SATA controller, Marvell chip. Didn&#x27;t work. It freeze randomly and woudn&#x27;t even unfreeze with a router reboot. Possibly too much power draw. Then I put a 2-port SATA, ASM1062 and a port replicator. That one works. 2 years and not one disconnect. The cables are a complete mess.

            2. Gigachad · · focus · HN ↗
              I&#x27;m using RAID on my Terramaster DAS and it&#x27;s been working fine for me. I think it&#x27;s less &quot;USB is unreliable&quot; and more &quot;Some SATA-USB adapters are unreliable&quot;.

              The Terramaster one is pretty widely used in home setups and seems perfectly fine.

              1. M95D · · focus · HN ↗
                Be warned that Terramaster does RAID with 512B stripe size. If it fails, you can&#x27;t mount the drives in Linux.
        2. Gigachad · · focus · HN ↗
          I have not had this issue myself. Drives connected for around 6 months in raid without issue. But also, you should mount your drives using partition UUID rather than whatever linux decides to name them which is not stable as you&#x27;d noticed.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.