From 2892b7b416aab6c03ea0f80229be88f89112462d Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Fri, 5 Jul 2024 18:33:52 +0200 Subject: [PATCH] Update install.sh Only set volblocksize if sharefs is zfspool --- install.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 5bef031..2e70f66 100755 --- a/install.sh +++ b/install.sh @@ -160,9 +160,11 @@ sleep 2 if [ $LXC_MP -gt 0 ]; then pct set $LXC_NBR -mp0 $LXC_SHAREFS_STORAGE:$LXC_SHAREFS_SIZE,backup=1,mp=/$LXC_SHAREFS_MOUNTPOINT - pool=$(grep -A 4 $LXC_SHAREFS_STORAGE /etc/pve/storage.cfg | grep -m1 "pool " | cut -d ' ' -f2) - dataset=$(grep mp0 /etc/pve/lxc/$LXC_NBR.conf | cut -d ':' -f3 | cut -d',' -f1) - zfs set recordsize=$LXC_MP_RECORDSIZE $pool/$dataset + if [[ "$(pvesm status | grep $LXC_SHAREFS_STORAGE | cut -d ' ' -f6)" == "zfspool" ]]; then + pool=$(grep -A 4 $LXC_SHAREFS_STORAGE /etc/pve/storage.cfg | grep -m1 "pool " | cut -d ' ' -f2) + dataset=$(grep mp0 /etc/pve/lxc/$LXC_NBR.conf | cut -d ':' -f3 | cut -d',' -f1) + zfs set recordsize=$LXC_MP_RECORDSIZE $pool/$dataset + fi fi sleep 2;