Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fstrim: /: the discard operation is not supported

982 views
Skip to first unread message

hede

unread,
Jun 11, 2023, 2:10:05 PM6/11/23
to
Hi,

on bullseye fstrim was working fine, but after the upgrade to bookworm fstrim stops working.
Setup is: ext4 on LUKS on LVM on SSD

# lsblk --discard
NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda 0 512B 2G 0
├─sda1 0 512B 2G 0
└─sda2 0 512B 2G 0
└─sda2_crypt 0 0B 0B 0
├─volgrp-swap 0 0B 0B 0
├─volgrp-root 0 0B 0B 0
└─volgrp-home 0 0B 0B 0

Trimming the EFI partition (sda1) is fine, but trying to trim root or home results in:
fstrim: /: the discard operation is not supported

The command...
#dmsetup table /dev/mapper/sda2_crypt --showkeys
...doesn't show any allow-discard and because of this and the lsblk output I think it's cryptsetup/luks which is not working correctly here.

But the crypttab includes:
sda2_crypt UUID=[UUIDishere] none luks,discard

I've added "issue_discards = 1" to /etc/lvm/lvm.conf without success - and btw. that wasn't needed before the upgrade.

Any hints what to test or where to search for a solution?

regards
hede

Tixy

unread,
Jun 11, 2023, 2:20:06 PM6/11/23
to
On Sun, 2023-06-11 at 19:54 +0200, hede wrote:
> Hi,
>
> on bullseye fstrim was working fine, but after the upgrade to bookworm fstrim stops working.
> Setup is: ext4 on LUKS on LVM on SSD

I have same setup on the machine I upgraded to Bookworm today and I
just checked and discards still work.

[...]
>
> But the crypttab includes:
> sda2_crypt UUID=[UUIDishere] none luks,discard
>
> I've added "issue_discards = 1" to /etc/lvm/lvm.conf without success - and btw. that wasn't needed before the upgrade.

I have both those settings, have done since I googled how to do this a
few releases ago.

> Any hints what to test or where to search for a solution?

After changing lvm.conf did you rebuild initramfs and reboot?

--
Tixy

hede

unread,
Jun 11, 2023, 2:20:06 PM6/11/23
to
On Sun, 11 Jun 2023 19:54:32 +0200 hede <debi...@der-he.de> wrote:

> on bullseye fstrim was working fine, but after the upgrade to bookworm fstrim stops working.

Sorry, my fault.

I'm using a script to decrypt this drive via SecureBoot+TPM so /etc/crypttab doesn't get used and this script doesn't use the allow-discard option by default and was resetted to default values with the upgrade to bookworm.

After patching the script, everything is fine for me. :-)

(btw, I have to repair my github repo ... somehow it's broken:
https://github.com/hede5562/mortar , fork of https://github.com/noahbliss/mortar
I mean, github is broken, but... okay... github is Microsoft now... eh!?)

regards
hede
0 new messages