10 Commits
v0.1 ... v0.2

Author SHA1 Message Date
Thorsten Spille
239715d536 Update README.md 2021-04-23 18:40:19 +02:00
Thorsten Spille
b2044fcd0e Update install.sh 2021-04-23 18:23:21 +02:00
Thorsten Spille
e910ff1bee Merge pull request #1 from datazon/patch-1
Update install.sh
2021-04-23 18:22:47 +02:00
Thorsten Spille
cd0d7e2189 Update install.sh 2021-04-23 18:22:37 +02:00
Thorsten Spille
48f01bf87c Replaced sed -i by rpl 2021-04-22 23:12:52 +02:00
Thorsten Spille
513e37246e Merge pull request #2 from LucaAust/patch-1
fix calculation error for arcsize
2021-04-22 22:26:26 +02:00
Thorsten Spille
613e379bfb Fixed arc size calculation 2021-04-22 22:23:03 +02:00
Luca Austelat
66efc4ebbc fix calculation error for arcsize 2021-04-22 22:22:36 +02:00
datazon
8faef151e5 Update install.sh
- Added htop mc vim packages
- disabling enterprise repository is better than removing, if later subscription ist purchased
2021-04-22 15:19:46 +02:00
Thorsten Spille
1f4e705594 Update README.md 2021-04-21 13:36:57 +02:00
2 changed files with 12 additions and 13 deletions

View File

@@ -1,10 +1,10 @@
# proxmox-zfs-postinastall # proxmox-zfs-postinstall
This script installs and configures basic tools for running a Proxmox Server. This script installs and configures basic tools for running a Proxmox Server.
Following settings are made: Following settings are made:
- Remove `pve-enterprise` repo - Remove `pve-enterprise` repo
- Add `pve-no-subscription` repo - Add `pve-no-subscription` repo
- Upgrade system to latest version - Upgrade system to latest version
- Install basic tools: `vim ifupdown2 net-tools dnsutils ethtool git curl unzip screen iftop lshw smartmontools nvme-cli lsscsi sysstat zfs-auto-snapshot` - Install basic tools: `vim ifupdown2 net-tools dnsutils ethtool git curl unzip screen iftop lshw smartmontools nvme-cli lsscsi sysstat zfs-auto-snapshot htop mc rpl`
- Configure snapshot retention for `zfs-auto-snapshot` - Configure snapshot retention for `zfs-auto-snapshot`
- Set limits for level 1 arc (`zfs_arc_min` and `zfs_arc_max`) - Set limits for level 1 arc (`zfs_arc_min` and `zfs_arc_max`)

View File

@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Define basic tools to install # Define basic tools to install
TOOLS="vim ifupdown2 net-tools dnsutils ethtool git curl unzip screen iftop lshw smartmontools nvme-cli lsscsi sysstat zfs-auto-snapshot" TOOLS="vim ifupdown2 net-tools dnsutils ethtool git curl unzip screen iftop lshw smartmontools nvme-cli lsscsi sysstat zfs-auto-snapshot htop mc rpl"
# Define zfs-auto-snapshot retention policy # Define zfs-auto-snapshot retention policy
SNAP_FREQUENT=8 SNAP_FREQUENT=8
@@ -14,8 +14,8 @@ SNAP_MONTHLY=3
ZFS_ARC_MIN=128 ZFS_ARC_MIN=128
ZFS_ARC_MAX=256 ZFS_ARC_MAX=256
# remove pve-enterprise repo and add pve-no-subscription repo # disable pve-enterprise repo and add pve-no-subscription repo
rm -f /etc/apt/sources.list.d/pve-enterprise.list mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
apt update apt update
@@ -24,15 +24,15 @@ DEBIAN_FRONTEND=nonintercative DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade
DEBIAN_FRONTEND=nonintercative DEBIAN_PRIORITY=critical apt -y -qq install $TOOLS DEBIAN_FRONTEND=nonintercative DEBIAN_PRIORITY=critical apt -y -qq install $TOOLS
# configure zfs-auto-snapshot # configure zfs-auto-snapshot
sed -i 's/keep=4/keep=$SNAP_FREQUENT/g' /etc/cron.d/zfs-auto-snapshot rpl "keep=4" "keep=$SNAP_FREQUENT" /etc/cron.d/zfs-auto-snapshot
sed -i 's/keep=24/keep=$SNAP_HOURLY/g' /etc/cron.hourly/zfs-auto-snapshot rpl "keep=24" "keep=$SNAP_HOURLY" /etc/cron.hourly/zfs-auto-snapshot
sed -i 's/keep=31/keep=$SNAP_DAILY/g' /etc/cron.hourly/zfs-auto-snapshot rpl "keep=31" "keep=$SNAP_DAILY" /etc/cron.hourly/zfs-auto-snapshot
sed -i 's/keep=8/keep=$SNAP_WEEKLY/g' /etc/cron.weekly/zfs-auto-snapshot rpl "keep=8" "keep=$SNAP_WEEKLY" /etc/cron.weekly/zfs-auto-snapshot
sed -i 's/keep=8/keep=$SNAP_MONTHLY/g' /etc/cron.monthly/zfs-auto-snapshot rpl "keep=8" "keep=$SNAP_MONTHLY" /etc/cron.monthly/zfs-auto-snapshot
# set zfs_arc_limits # set zfs_arc_limits
ZFS_ARC_MIN_BYTES=$(($ZFS_ARC_MIN+1024*1024)) ZFS_ARC_MIN_BYTES=$(($ZFS_ARC_MIN*1024*1024))
ZFS_ARC_MAX_BYTES=$(($ZFS_ARC_MAX+1024*1024)) ZFS_ARC_MAX_BYTES=$(($ZFS_ARC_MAX*1024*1024))
echo $ZFS_ARC_MIN_BYTES > /sys/module/zfs/parameters/zfs_arc_min echo $ZFS_ARC_MIN_BYTES > /sys/module/zfs/parameters/zfs_arc_min
echo $ZFS_ARC_MAX_BYTES > /sys/module/zfs/parameters/zfs_arc_max echo $ZFS_ARC_MAX_BYTES > /sys/module/zfs/parameters/zfs_arc_max
@@ -42,4 +42,3 @@ options zfs zfs_arc_min=$ZFS_ARC_MIN_BYTES
options zfs zfs_arc_min=$ZFS_ARC_MAX_BYTES options zfs zfs_arc_min=$ZFS_ARC_MAX_BYTES
EOF EOF
update-initramfs -u -k all update-initramfs -u -k all