Now that Fedora 32 has fstrim.timer enabled by default... how about discards for the things that fstrim doesn't get? Two main things I know of:
- swap: Do discard at swapon time by setting "discard=once" in /etc/fstab would be somewhat similar to the periodic fstrim call. I don't know how much impact the "discard=pages" option might have (the man page says it is asynchronous, but it might make low-memory situations worse).
- logical volumes: Set "issue_discards = 1" in /etc/lvm/lvm.conf so that removed LVs get discarded.
On Tue, Apr 28, 2020, at 6:51 PM, Chris Adams wrote:
Now that Fedora 32 has fstrim.timer enabled by default... how about discards for the things that fstrim doesn't get? Two main things I know of:
- swap: Do discard at swapon time by setting "discard=once" in /etc/fstab would be somewhat similar to the periodic fstrim call. I don't know how much impact the "discard=pages" option might have (the man page says it is asynchronous, but it might make low-memory situations worse).
Seems reasonable.
- logical volumes: Set "issue_discards = 1" in /etc/lvm/lvm.conf so that removed LVs get discarded.
Could foreclose data recovery in case LV was removed entirely, so I'd leave it to fstrim.timer on the eventual filesystem.
V/r, James Cassell
Once upon a time, James Cassell fedoraproject@cyberpear.com said:
On Tue, Apr 28, 2020, at 6:51 PM, Chris Adams wrote:
Now that Fedora 32 has fstrim.timer enabled by default... how about discards for the things that fstrim doesn't get? Two main things I know of:
- swap: Do discard at swapon time by setting "discard=once" in /etc/fstab would be somewhat similar to the periodic fstrim call. I don't know how much impact the "discard=pages" option might have (the man page says it is asynchronous, but it might make low-memory situations worse).
Seems reasonable.
I guess this would be a change to anaconda (since it writes /etc/fstab)? Anybody else have any thoughts on this, should I just go file an RFE bug against anaconda, ??
- logical volumes: Set "issue_discards = 1" in /etc/lvm/lvm.conf so that removed LVs get discarded.
Could foreclose data recovery in case LV was removed entirely, so I'd leave it to fstrim.timer on the eventual filesystem.
That requires that a filesystem is created in the empty space. But I can also see your point in that discarding immediately may be an issue.
I use a script to create a temporary LV on a PV with free PEs and that supports discard and then remove it with issue_discards=1... would something like that be sensible to run along side fstrim.timer?
On Tuesday, April 28, 2020 3:51:44 PM MST Chris Adams wrote:
Now that Fedora 32 has fstrim.timer enabled by default...
Remember, only in Workstation.
how about discards for the things that fstrim doesn't get? Two main things I know of:
- swap: Do discard at swapon time by setting "discard=once" in
/etc/fstab would be somewhat similar to the periodic fstrim call. I don't know how much impact the "discard=pages" option might have (the man page says it is asynchronous, but it might make low-memory situations worse).
- logical volumes: Set "issue_discards = 1" in /etc/lvm/lvm.conf so that
removed LVs get discarded.
Are you asking for these just in Workstation, or are you suggesting that this is something all of Fedora adopts?