I’ve been hosting repository mirrors from my homelab rack for a while. I first set up Archlinux in May 2018, then followed OPNsense, Cygwin, MariaDB, Raspbian and lastly Manjaro — now they are in a Terrahost datacenter instead.

Initially, I hosted the repository files on two Raspberry Pi computers with USB drives, load-balanced with Haproxy. With each of the Raspberry Pis having 100 Mbit/s Ethernet ports, that meant 200 Mbit/s in total. After a few months, I instead started using an LXC container, with a network limitation of 300 Mbit/s. That left me with some available bandwidth on my 500 Mbit/s internet connection.

For about a year the LXC container served the files from a RAID6 array, but as the number of repositories grew it was noticeably impacting the pool performance during mirror syncing. RAID6 is not very efficient when writing files… So I set up a RAID10 array with 4x2 TB drives instead, giving me 4 TB of usable space. The RAID10 array provided both performance and data redundancy.

Four disks in RAID10

After I included the Raspbian repository, I saw a noticeable jump in traffic, but I also learned something previously unknown to me. I got emails from two users letting me know that the mirror was unavailable on IPv6. Both of these users had the same ISP as me, Altibox.

It seemed like my Altibox 6rd implementation was not correctly routing within its network. I never really found out why, but I suspect this route was missing in my OPNsense router:

2001:db8::/32 -> 6rd-virtual-int0 (direct connect to 6rd)

I like giving back to the community, and hosting repository mirrors seemed like an excellent way to do it. But there were a few things I didn’t like about it;

  • The 6rd route problem was bugging me, and it seemed very timeconsuming to debug.
  • Making network changes, or doing maintenance that caused downtime was not as straight forward.
  • I got stressed if something happened to the mirror hosting while I was out.

So in September 2019, I sent a request to Terrahost, asking if they would host the repository mirrors instead. They seemed like the perfect candidate; located in Sandefjord, not too far from Horten were I live. 10 Gbit/s internet, IPv6, backup generators, everything you would expect from a proper datacenter.

Terrahost datacenter

They responded quickly saying that they were already hosting mirrors, and could add the repositories I had as well. A few days later, they had synced. I have put a 301 redirect on mirror.homelab.no, and I’m in the process of contacting the repository owners, letting them know of the change.

So now mirror.homelab.no is now instead mirror.terrahost.no, on a 10 Gbit/s redundant internet connection, in a datacenter. They are providing a much better mirroring service than I ever did! And now I can make changes to my stack without worrying about downtime.

At the end, I had about 1 TB of traffic per month, but I suspect that will increase with the new and improved mirror.

Thanks Terrahost! You are awesome!

Last commit 2023-02-25, with message: Publish Arch Linux local repository post.