Tuning Linux ZFS

Edit /etc/modprobe.d/zfs.conf

# Set use max memory at half of system memory (ex. 4GB/2)
options zfs zfs_arc_max=2147483648

# Increase scrub/resilver worker
options zfs zfs_vdev_scrub_min_active=24
options zfs zfs_vdev_scrub_max_active=64

# Increase sync write
options zfs zfs_vdev_sync_write_min_active=8
options zfs zfs_vdev_sync_write_max_active=32

# Increase sync reads
options zfs zfs_vdev_sync_read_min_active=8
options zfs zfs_vdev_sync_read_max_active=32

# Increase async reads
options zfs zfs_vdev_async_read_min_active=8
options zfs zfs_vdev_async_read_max_active=32

# Increase async write
options zfs zfs_vdev_async_write_min_active=8
options zfs zfs_vdev_async_write_max_active=32

Save and reboot system to active configuration

Mirror http(s) (s)ftp(s) with lftp

Install lftp

#!/usr/bin/env bash
apt update && apt -y full-upgrade
apt -y install lftp
exit 0

Mirror from remote to local

lftp http://mirror.remote.site/src-path -e "mirror -e -c -P=4 . /local/target-path; bye"

Explain

lftp remote_url/path -e [command]

mirror [option] source target

-e delete different files

-c continue transfer

-P=[number] number of parallel connections

Enable IPv4 and IPv6 on Zimbra Collaboration

Work around nginx proxy IPv6 fix

sed -i 's| ipv6only=off||g' /opt/zimbra/conf/nginx/templates/nginx.conf.*

Get current settings

su zimbra
zmprov gs `zmhostname` | grep -i ipmode

Get public IP

# IPv6
curl http://v6.ipv6-test.com/api/myip.php
# IPv4
curl http://v4.ipv6-test.com/api/myip.php

Enable IPv4 and IPv6

zmprov ms `zmhostname` zimbraIPMode both
zmprov ms `zmhostname` "127.0.0.0/8 [::1]/128 IPv4/32 [IPv6]/128"
/opt/zimbra/libexec/zmiptool
zmcontrol restart