1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-23 02:04:42 +02:00

Update fstrim.sh

tweak
This commit is contained in:
tteckster 2024-02-19 13:13:44 -05:00 committed by GitHub
parent b082f8a08e
commit 9478fffd5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "
function trim_container() { function trim_container() {
local container=$1 local container=$1
header_info header_info
echo -e "${BL}[Info]${GN} Trimming ${container} ${CL} \n" echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n"
local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}') local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}')
echo -e "${RD}Data before trim $before_trim%${CL}" echo -e "${RD}Data before trim $before_trim%${CL}"
pct fstrim $container pct fstrim $container