Mount Root FS noatime⌗
To reduce writes to the SD card, I mounted the root fs with noatime
. The line in my /etc/fstab
now looks like this:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdh1 during installation
UUID=b58dfd0c-b6dc-4e44-a9b8-22ba3a5540d8 / ext4 errors=remount-ro,noatime 0 1
Move Logs to Datastore Disks⌗
Logs are stored in /var/log/proxmox-backup
and a subdirectory for tasks
can grow qutite significantly, with my larger file backups taking hundreds of MB for a log. This is not great for my root SD card, so I want to move them to zfs. I’m going to keep the api
logs on root.
The zfs fs is already mounted at /mnt/datastore/backup
(the datastore is named backup
), so I created a zfs dataset backup/logs
. I then rsync copied the logs into it rsync -r -v /var/log/proxmox-backup/tasks /mnt/datastore/backup/logs/
, deleted the original rm -rf /var/log/proxmox-backup/tasks
and symlinked it back back ln -s /mnt/datastore/backup/logs/tasks /var/log/proxmox-backup/tasks
. I then needed to fix permissions to user/group backup:backup
with chown backup:backup -R /mnt/datastore/backup/logs
and chown backup:backup /var/log/proxmox-backup/tasks
. After this, task logs were working correctly and backups were happy again.
Increase ZFS ARC Limit⌗
Since the system exists primarily to store the data in ZFS and has no large workload otherwise, I increased the ARC max from 50% of system RAM (Default) to 75%, in my case 12GB. I did this by first calculating the number of bytes in 12GB (12884901888) and storing this in a new file /etc/modprobe.d/zfs.conf
with the following contents:
options zfs zfs_arc_max=12884901888
To apply this immediately instead of on the next boot, I did things
TBD