* [PVE-User] Trim and ZFS pools on SSD...
@ 2022-01-20 10:55 Marco Gaiarin
2022-01-20 11:52 ` Ralf Storm
2022-01-25 11:15 ` Marco Gaiarin
0 siblings, 2 replies; 5+ messages in thread
From: Marco Gaiarin @ 2022-01-20 10:55 UTC (permalink / raw)
To: pve-user
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!!!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PVE-User] Trim and ZFS pools on SSD...
2022-01-20 10:55 [PVE-User] Trim and ZFS pools on SSD Marco Gaiarin
@ 2022-01-20 11:52 ` Ralf Storm
2022-01-21 10:06 ` Marco Gaiarin
2022-01-25 11:15 ` Marco Gaiarin
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Storm @ 2022-01-20 11:52 UTC (permalink / raw)
To: pve-user
Hi,
make sure your Vdisks are connected via scsi and the scsi controller is
virtioscsi, the discs need to have the checkmark "discard".
You can check if it works under ubuntu and debian wit hte command
"fstrim -av" - if there is no output it doesn`t work, otherwise, after a
while you will get the trim results displayed.
hope that helps....
Am 20/01/2022 um 11:55 schrieb Marco Gaiarin:
> 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.
>
--
Ralf Storm
Systemadministrator
Konzept Informationssysteme GmbH
Am Weiher 13 • 88709 Meersburg
Fon: +49 7532 4466-299
Fax: +49 7532 4466-66
ralf.storm@konzept-is.de
www.konzept-is.de
Amtsgericht Freiburg 581491 • Geschäftsführer: Dr. Peer Griebel,
Frank Häßler
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PVE-User] Trim and ZFS pools on SSD...
2022-01-20 11:52 ` Ralf Storm
@ 2022-01-21 10:06 ` Marco Gaiarin
[not found] ` <mailman.147.1642763829.436.pve-user@lists.proxmox.com>
0 siblings, 1 reply; 5+ messages in thread
From: Marco Gaiarin @ 2022-01-21 10:06 UTC (permalink / raw)
To: Ralf Storm; +Cc: pve-user
Mandi! Ralf Storm
In chel di` si favelave...
> make sure your Vdisks are connected via scsi and the scsi controller is
> virtioscsi, the discs need to have the checkmark "discard".
> You can check if it works under ubuntu and debian wit hte command
> "fstrim -av" - if there is no output it doesn`t work, otherwise, after a
> while you will get the trim results displayed.
No, sorry, i've posted two 'trim/discard' topic that (apart this) are
totally unrelated.
I'm speaking now of host OS, eg PVE: if i have an SSD-based ZFS pool, how
can i trim it?
Seems that recent 'zfsutils-linux' package add some 'framework' to do trim,
but seems (totally) undocumented. So i'm seeking feedback.
I hope i was clear now...
--
Dai diamanti non nasce niente
dal letame nascono i fior (F. De Andre`)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PVE-User] Trim and ZFS pools on SSD...
2022-01-20 10:55 [PVE-User] Trim and ZFS pools on SSD Marco Gaiarin
2022-01-20 11:52 ` Ralf Storm
@ 2022-01-25 11:15 ` Marco Gaiarin
1 sibling, 0 replies; 5+ messages in thread
From: Marco Gaiarin @ 2022-01-25 11:15 UTC (permalink / raw)
To: Marco Gaiarin; +Cc: pve-user
> Someone can confirm that? I've simply to do something like:
> zpool set org.debian:periodic-trim=yes rpool
Seems sufficient to do:
zfs set org.debian:periodic-trim=enable rpool
to have the pool get trimmed.
I hope will be documented, sooner or later.
--
Voi non ci crederete
la mia ragazza sogna (R. Vecchioni)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PVE-User] Trim and ZFS pools on SSD...
[not found] ` <mailman.147.1642763829.436.pve-user@lists.proxmox.com>
@ 2022-01-25 11:17 ` Marco Gaiarin
0 siblings, 0 replies; 5+ messages in thread
From: Marco Gaiarin @ 2022-01-25 11:17 UTC (permalink / raw)
To: Arjen via pve-user; +Cc: pve-user
Mandi! Arjen via pve-user
In chel di` si favelave...
> You can enabled the autotrim feature of the ZFS pool or run zpool trim <your-pool>.
> To get more information use this command on PVE: man zpool trim
> Is that what you were asking for?
No, 'autotrim' is a potentially dangerous option, because 'trim' can happen
on a inpredictable way, leading to server load, ...
It is better to schedue trim in non-working hour, so the script.
--
chi si convertiva nel novanta
ne era dispensato nel novantuno (F. De Andre`)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-25 20:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 10:55 [PVE-User] Trim and ZFS pools on SSD Marco Gaiarin
2022-01-20 11:52 ` Ralf Storm
2022-01-21 10:06 ` Marco Gaiarin
[not found] ` <mailman.147.1642763829.436.pve-user@lists.proxmox.com>
2022-01-25 11:17 ` Marco Gaiarin
2022-01-25 11:15 ` Marco Gaiarin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox