ZFS replication using ZRepl
Till yesterday I used a simple USB disk as a ZFS backup pool. I had a moderately complex script started by cron at 6’o clok every morning to create a new snapshot about some vital information storing datasets and then zfs send and zfs recv it to the USB disk. It wasn’t too elegant and it made me always a bit nervous knowing how volitaile...
Running Redis in LX zone
Systemctl throws a hiss if you attempt to run redis in a LX branded zone. Oct 08 21:37:57 paperless (s-s[4078]: redis-server.service: Failed at step USER spawning /usr/bin/redis-server: Operation not permitted Oct 08 21:37:57 paperless (s-s[4078]: redis-server.service: Failed to set up user namespacing: Operation not permitted The solusion is pretty simple, we need to create an override.conf file with the following content: root@paperless:~# mkdir -p /etc/systemd/system/redis.service.d/...
Fixing a blinking Windows Terminal
Connecting to my OmniOS NAS from the Windows 10 Terminal causes a blinking issue in nano. I usually fix it with: % export TERM=vt100 But I sometimes forget - which can be a health risk. I don’t want this in my shell config, since other terminal emulators work fine and need better TERM settings. So I added this to my .ssh/config on the Windows machine:...
Automatically load IPF rules after reboot
I had configured some firewall rules on my NAS, which initially seemed to work correctly. However, I later noticed that the rules were not being applied after the NAS was rebooted. I began investigating the issue. First, I removed all customizations and disabled, then re-enabled the IP filter service. After rebooting the NAS, I examined the current state of the system: root@omnios:~# svcs |grep ipf...
Cron based ZFS snapshot
ZFS snapshots are a simple and secure way to store a read-only state of a file system that can be restored in the event of accidental data loss, transferred, and replicated to another machine for backup. I wanted the NAS to take a snapshot every day and keep the last 7 snapshots. Here’s how I did it: # cat zfs_snapshot_create.sh #!/usr/bin/env zsh # Daily ZFS...