#!/bin/bash # Filename: pve8-setup.sh # Perform basic config/tuning on a newly installed Proxmox v8.x host # Run this script only once! # # To run to run use one of the below commands: # wget -O - -q https://go.porna.net/go/pve8-setup.sh | bash # curl -s https://go.poorna.net/go/pve8-setup.sh | bash # Ensure that we are running on a proxmox host if [ ! -f /usr/bin/pveversion ]; then echo 'This script is intended to run only on a Proxmox host' exit 1 fi set -eoux pipefail echo 'Setting up a new proxmox host' # Speed up ZFS at the cost of possible risk data loss on power loss echo 'Setting sync=disabled on rpool' zfs get sync rpool zfs set sync=disabled rpool zfs get sync rpool echo 'Setting atime=off on rpool' zfs get atime rpool zfs set atime=off rpool zfs get atime rpool echo 'Setting relatime=off on rpool' zfs get relatime rpool zfs set relatime=off rpool zfs get relatime rpool echo 'Updating PVE no-subscription lists' rm /etc/apt/sources.list.d/{pve-*,ceph*}.list cat > /etc/apt/sources.list.d/pve-no-subscription.list < /etc/apt/sources.list.d/ceph.list <