Compare commits

..

3 Commits

Author SHA1 Message Date
tteckster c702652a00
Update fstrim.sh
tweak
2024-02-17 15:59:54 -05:00
tteckster 86da4aaabb
Update post-pve-install.sh
tweak
2024-02-17 15:58:34 -05:00
tteckster c7cf925187
Update fstrim.sh
display the data percentage used before and after trimming
2024-02-17 13:08:07 -05:00
2 changed files with 7 additions and 3 deletions

View File

@ -44,11 +44,15 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "
function trim_container() { function trim_container() {
local container=$1 local container=$1
local name=$(pct exec "$container" hostname) local name=$(pct exec "$container" hostname 2>/dev/null || echo "No hostname because the container is not running")
header_info header_info
echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n" echo -e "${BL}[Info]${GN} Trimming ${name} ${CL} \n"
local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}')
echo -e "${RD}Data before trim $before_trim%${CL}"
pct fstrim $container pct fstrim $container
sleep 1 local after_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"$container"'/) {gsub(/%/, "", $7); print $7}')
echo -e "${GN}Data after trim $after_trim%${CL}"
sleep 1.5
} }
for container in $(pct list | awk '{if(NR>1) print $1}'); do for container in $(pct list | awk '{if(NR>1) print $1}'); do

View File

@ -99,7 +99,7 @@ EOF
esac esac
if [[ "${VERSION}" == "bookworm" ]]; then if [[ "${VERSION}" == "bookworm" ]]; then
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories.\n \nCorrect 'ceph package sources?" 14 58 2 \ CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "CEPH PACKAGE REPOSITORIES" --menu "The 'Ceph Package Repositories' provides access to both the 'no-subscription' and 'enterprise' repositories (initially disabled).\n \nCorrect 'ceph package sources?" 14 58 2 \
"yes" " " \ "yes" " " \
"no" " " 3>&2 2>&1 1>&3) "no" " " 3>&2 2>&1 1>&3)
case $CHOICE in case $CHOICE in