Setting up my new Synology DS1520+
Some time ago I built a NAS for personal usage. It has been a blessing in my life as I’m not afraid of losing data or going out of storage anymore. However, due to some unfortunate events, I don’t have a place to run it other than my bedroom, but it is too noisy to keep it beside my bed.
I decided to migrate the server to a smaller form so that I could rest comfortable without a running computer on my ears. Interestingly, in Brazil we don’t have much options for small factor cases such as ITX. Considering that I wouldn’t be able to build it my own, I decided to go with a Synology DS1520+.
Now, I’m going to be honest here, the software is absolutely awesome. Personally, I don’t like to use closed-source software (and I’ll show you one of the reasons in a few moments), but the disk and backup management is way better than something I could come up with. I don’t know how long they will support my model and its software but for the time being I’m enjoying it.
Partitioning and formatting was always a struggle for me as I can’t decide for myself if I should go with Btrfs or ZFS; which RAID setup or how many datasets to create. This was all automatically handled for me.
This is the part that sucks the most about the device. I mean, the hardware is definitely reasonable for its original use case: file storage. It has a Celeron J4125 with 8GB DDR4 ECC RAM (up to 20GB). This is more than enough for my needs.
What about the noise? I can’t hear it at all! The only noise that it introduces to the room is actually from it hard-drives, but nothing loud enough to disrupt my sleep as it’s barely noticeable.
Something that I think I shouldn’t have bought is the NVMe drive for caching. I thought that by running a bunch of media software I’d get better performance caching reads on the SSD. Well, it turns out that I don’t actually have this much reads and I only hit a cache of 5GB on a daily-basis.
What about the containers?
Synology provides an official Docker application at its Package
Center that you can just install and go crazy with it… or not. I
might have done everything wrong and tried to circumvent the software
in a way that is not recommended. However, every time I tried to run a
container that exposes an HTTP server, I got redirected to the port
5000 by my device’s NGINX. I spent a ridiculous amount of time
trying to change this behavior but I thought that it would be easier
to setup this in a way that I’m used to.
Alpine Linux for the rescue
Feeling defeated by Synology’s software, I decided to try a different approach: a regular Linux distribution. As my hardware is really limited, I want to use as less resources as possible. For this reason I chose to go with Alpine Linux1 as the backbone of my virtual machine.
There’s nothing novel about running containers with Docker and
docker-compose, so I’m not going to dig deeper on setting this up.
Using NFS as the storage
Docker has a poorly documented way of setting up an NFS share directly on the container and due to this I assume they don’t want you to use this feature 😜. Anyway, mounting an NFS share is much easier than going trial and error with docker volumes over NFS.
I created the NFS share on Synology’s dashboard and then on my alpine machine I ran:
mkdir -p /mnt/docker mount -t nfs <ip>:/volume1/<share-dir> /mnt/docker
I also added this line on my
/etc/fstab file to automatically mount
the NFS volume after boot:
<ip>:/volume1/<share-dir> /mnt/docker nfs _netdev 0 0
This might not be obvious at this point, but doing things this way is
awesome because I can just mount volumes pointing to
backup them through Hyper Backup on Backblaze B2.
caddy: image: caddy:2.6 # ... volumes: - /mnt/docker/caddy/Caddyfile:/etc/caddy/Caddyfile # ...
This setup gives me the most out of everything I tried so far:
- I configure my services through a regular Linux system with extensive documentation.
- Hyper Backup assures me things are backed up correctly.
- They are regular containers, I can easily migrate to another host
My current experience has been positive. Although, I’m still kind of skeptical about the longevity of the backup software. It is easy to use and makes incremental backups a breezy to setup, but I still want the freedom to restore on a Linux server without much trouble. Well, this is mostly a personal desire and I understand this device was not made for my use case! 😁
They even provide an image made specifically for virtualization! 🎉 ↩︎