[dm-devel] fstrim discarding too many or wrong blocks on Linux 5.1, leading to data loss

Milan Broz gmazyland at gmail.com
Mon May 20 16:45:04 UTC 2019


On 20/05/2019 16:53, Andrea Gelmini wrote:
...
> Also, changing crypttab:
> root at glet:~# cat /etc/crypttab
> sda6_crypt UUID=fe03e2e6-b8b1-4672-8a3e-b536ac4e1539 none luks,discard
> 
> removing discard didn't solve the issue.

This is very strange, disabling discard should reject every discard IO
on the dmcrypt layer. Are you sure it was really disabled?

Note, it is the root filesystem, so you have to regenerate initramfs
to update crypttab inside it.

Could you paste "dmsetup table" and "lsblk -D" to verify that discard flag
is not there?
(I mean dmsetup table with the zeroed key, as a default and safe output.)

Milan




More information about the dm-devel mailing list