zenodotus280

SYSLOG 25-W09

making a plan for fully automated backups; wake-on-lan with provisions for syncoid and auto-shutdown


Wake, Sync[oid], Report, Die

KRONOS is my "offline" server for backups, typically powered down to save energy and more importantly because of the noise: it's an old, decommissioned server from work that makes a god-awful amount of noise. But with 16 drive bays I'm willing to find a workaround to leverage its capabilities. 1. I use Sanoid for automatic ZFS snapshots on AVALON 2. I then invoke Syncoid on CAIRO to replicate those snapshots to KRONOS (mentioned in 25-W08) 3. The next step is to automate the boot, sync, and shutdown process.


For now I need to:

  • wake KRONOS with a magic packet (WOL).
  • configure a systemd service to run a wrapper script that pulls snapshots in and prunes old ones
  • reports success to HealthChecks.io
  • Shutdown KRONOS

Wake-on-LAN

KRONOS has a Supermicro board and therefore has IPMI. I first wanted to see what capabilities were available. I chose Proxmox as a base OS not because I will run any VMs or LXCs but because it's the most comfortable way for me to get ZFS on Debian.

apt install ipmitool ipmitool lan print 1

There was no indication of a WOL setting nor could it be set.

Using ethtool enp3s0 I discovered that WOL exists but is disabled for my 10G port:

Settings for enp3s0:
   Supported ports: [ TP ]
   Supported link modes:   10000baseT/Full

   ...]

   Supports Wake-on: d
   Wake-on: d

   [...]

   Link detected: no

A quick invokation of ip -c a on KRONOS showed the rest of the NICs and they showed...

Supports Wake-on: pumbg
   Wake-on: {d,g}

which is perfect. ethtool -s {NIC NAME} wol g to enable for each NIC.

For testing from my desktop...

  1. pacman -S wakeonlan
  2. wakeonlan 00:25:90:XX:XX:XX and KRONOS dutifully booted up!

I added a Wake-on-LAN integration into Home Assistant and added a button to my dashboard. Now I can boot the server before I leave the house and let it scream and howl while I'm gone.

All my snapshots have been populated by pushing them from CAIRO where Sanoid and Syncoid have been in use for years. The simplicity of those tools means that I didn't even need them on KRONOS since they are just wrappers for native zfs send|recv commands alongside ssh. But I will now need to configure Sanoid and Syncoid to start pruning and to pull my snapshots in.

Thoughts? Leave a comment