From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaio@lilliput.linux.it>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 723976247C
 for <pve-user@lists.proxmox.com>; Thu, 20 Jan 2022 12:10:50 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 68C2223B6E
 for <pve-user@lists.proxmox.com>; Thu, 20 Jan 2022 12:10:20 +0100 (CET)
Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 00BD723B57
 for <pve-user@lists.proxmox.com>; Thu, 20 Jan 2022 12:10:19 +0100 (CET)
Received: by picard.linux.it (Postfix, from userid 10)
 id ADA453C969D; Thu, 20 Jan 2022 12:10:12 +0100 (CET)
Received: from news by eraldo.lilliput.linux.it with local (Exim 4.89)
 (envelope-from <gaio@lilliput.linux.it>) id 1nAVGU-0006S7-43
 for pve-user@lists.proxmox.com; Thu, 20 Jan 2022 12:06:02 +0100
From: Marco Gaiarin <gaio@lilliput.linux.it>
Date: Thu, 20 Jan 2022 11:55:29 +0100
Organization: Il gaio usa sempre TIN per le liste, fallo anche tu!!!
Message-ID: <vlrnbi-53d.ln1@hermione.lilliput.linux.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: eraldo.lilliput.linux.it 1642676154 22884 192.168.24.2 (20 Jan 2022
 10:55:54 GMT)
X-Mailer: tin/2.4.4-20191224 ("Millburn")  (Linux/5.4.0-96-generic (x86_64))
X-Gateway-System: SmartGate 1.4.5 <news.lilliput.linux.it>
To: pve-user@lists.proxmox.com
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.008 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 JMQ_SPF_NEUTRAL           0.5 SPF set to ?all
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [PVE-User] Trim and ZFS pools on SSD...
X-BeenThere: pve-user@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE user list <pve-user.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-user/>
List-Post: <mailto:pve-user@lists.proxmox.com>
List-Help: <mailto:pve-user-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user>, 
 <mailto:pve-user-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 20 Jan 2022 11:10:50 -0000


I've asked this some month ago, eg i've asked if there's in PVE some
'framework' to enable trim for SSD ZFS pools. At that time the reply was no.


Now seems arrived, seems a standard debian feature for 'zfsutils-linux': at
the crontab /etc/cron.d/zfsutils-linux :

 # TRIM the first Sunday of every month.
 24 0 1-7 * * root if [ $(date +\%w) -eq 0 ] && [ -x /usr/lib/zfs-linux/trim ]; then /usr/lib/zfs-linux/trim; fi

and /usr/lib/zfs-linux/trim script seems to automatically trim every pool
that have not 'autotrim' enabled and have defined the custom property:

	org.debian:periodic-trim

but i've not found info on debian and PVE documentation.


Someone can confirm that? I've simply to do something like:

	zpool set org.debian:periodic-trim=yes rpool


Thanks.

-- 
  Ogni giorno un sistemista Nt si sveglia... e sa che dovrà lavorare.
  Ogni giorno un sistemista Linux si sveglia... alle 13.00, per il pranzo.
  Non importa che tu sia sistemista Nt o Linux... tanto ti pagano uguale!!!