Me being a curious guy which loves ZFS since years, i was installing ZFS on my Desktop to (slightly guided by this). I've stumbled upon an interesting statement:
Ok, sounds legit. To apply to Proxmox and LXC Containers on ZFS, i've used this handy snippet ($TANK is the ZFS dataset which holds your containers):
Good to know that the second -exec will only be executed if the first succeeds.
As /var/log is already compressed by ZFS, logrotate’s compression is going to burn CPU and disk I/O for (in most cases) very little gain. Also, if you are making snapshots of /var/log, logrotate’s compression will actually waste space, as the uncompressed data will live on in the snapshot. You can edit the files in /etc/logrotate.d by hand to comment out compress, or use this loop (copy-and-paste highly recommended):
...
Ok, sounds legit. To apply to Proxmox and LXC Containers on ZFS, i've used this handy snippet ($TANK is the ZFS dataset which holds your containers):
Code:
find $TANK -regextype sed -regex ".*/etc/logrotate.d/.*" \
-exec grep -Eq "(^|[^#y])compress" {} \; \
-exec sed -i -r "s/(^|[^#y])(compress)/\1#\2/" {} \;
Good to know that the second -exec will only be executed if the first succeeds.