I have installed system on ext4 filesystem on lvm (vg name
encrypted, root is called
encrypted-root) on luks. When I'm trying to run
fstrim /, I get
fstrim: /: the discard operation is not supported.
cryptroot UUID=5ddb7e3a-dcbe-442d-85e8-359e944d0717 none luks,discard,lvm=encrypted
issue_discards = 1
/etc/initramfs-tools/conf.d/cryptroot contains only
update-initramfs -k all -c to create initramfs).
I have tried to manually put
rd.luks.options=discard as parameter for linux in grub. I have tried
refresh option of
cryptsetup utility (
cryptsetup --allow-discards refresh
device), but it does not seem to have one (
cryptsetup: Unknown action).
Physical device apparently has
TRIM support, when I run
fstrim /boot it works (it's same device, just not encrypted).
dmsetup table command does not show
When I boot from USB and manually decrypt (with
--allow-discards argument to
cryptsetup) and mount root partition, it works. I have tried to use
--persistent option, but it said that it couldn't make it persistent.
I'm lost. What should I do to make
fstrim / work? Something tells me I should somehow modify boot options in grub, but I'm not sure how. I'm also not sure if line in /etc/crypttab is used at all (I changed it to
cryptroot after install, it seems to do nothing even if I change it).
I'm running Linux Mint 19.3.