dm-crypt.saout.de archive mirror
 help / color / mirror / Atom feed
* [dm-crypt] luks2 and discard/trim not working
@ 2020-05-09 14:25 Nikolay Kichukov
  2020-05-09 15:45 ` Chris Murphy
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Kichukov @ 2020-05-09 14:25 UTC (permalink / raw)
  To: dm-crypt

Hello folks,

Recently, I upgraded to LUKS2 on a NVME SSD disk and noticed that fstrim
does not work. Surely it was running fine with LUKS1.

Here are some more details:

GNU/Gentoo Linux
kernel: 5.5.13-gentoo-x86_64
sys-fs/cryptsetup-2.2.2

NVME supports discard and fstrim on filesystem on nvme0n1p2(without
LUKS2 encyption) works fine:

NAME         DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
nvme0n1             0      512B       2T         0
├─nvme0n1p1         0      512B       2T         0
├─nvme0n1p2         0      512B       2T         0
└─nvme0n1p3         0      512B       2T         0
  └─root_dif        0        0B       0B         0
    └─root          0        0B       0B         0

dmsetup table /dev/mapper/root | grep allow
0 947028136 crypt capi:rfc7539(chacha20,poly1305)-random
:32:logon:cryptsetup:6ae40ec7-1b4c-40ea-871b-d13c9ae66b92-d0 0 254:0 0
2 allow_discards integrity:28:aead

cryptsetup status root
/dev/mapper/root is active and is in use.
  type:    LUKS2
  cipher:  chacha20-random
  keysize: 256 bits
  key location: keyring
  integrity: poly1305
  device:  /dev/nvme0n1p3
  sector size:  512
  offset:  0 sectors
  size:    947028136 sectors
  mode:    read/write
  flags:   discards 

However:
fstrim -v /
fstrim: /: the discard operation is not supported

Any ideas?

Thanks,
-Nikolay

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [dm-crypt] luks2 and discard/trim not working
@ 2020-05-08 21:41 Nikolay Kichukov
  0 siblings, 0 replies; 9+ messages in thread
From: Nikolay Kichukov @ 2020-05-08 21:41 UTC (permalink / raw)
  To: dm-crypt

Hello folks,

Recently, I upgraded to LUKS2 on a NVME SSD disk and noticed that fstrim
does not work. Surely it was running fine with LUKS1.

Here are some more details:

GNU/Gentoo Linux
kernel: 5.5.13-gentoo-x86_64
sys-fs/cryptsetup-2.2.2

NVME supports discard and fstrim on filesystem on nvme0n1p2(without
LUKS2 encyption) works fine:

NAME         DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
nvme0n1             0      512B       2T         0
├─nvme0n1p1         0      512B       2T         0
├─nvme0n1p2         0      512B       2T         0
└─nvme0n1p3         0      512B       2T         0
  └─root_dif        0        0B       0B         0
    └─root          0        0B       0B         0

dmsetup table /dev/mapper/root | grep allow
0 947028136 crypt capi:rfc7539(chacha20,poly1305)-random
:32:logon:cryptsetup:6ae40ec7-1b4c-40ea-871b-d13c9ae66b92-d0 0 254:0 0
2 allow_discards integrity:28:aead

cryptsetup status root
/dev/mapper/root is active and is in use.
  type:    LUKS2
  cipher:  chacha20-random
  keysize: 256 bits
  key location: keyring
  integrity: poly1305
  device:  /dev/nvme0n1p3
  sector size:  512
  offset:  0 sectors
  size:    947028136 sectors
  mode:    read/write
  flags:   discards 

However:
fstrim -v /
fstrim: /: the discard operation is not supported

Any ideas?

Thanks,
-Nikolay

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-10  1:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 14:25 [dm-crypt] luks2 and discard/trim not working Nikolay Kichukov
2020-05-09 15:45 ` Chris Murphy
2020-05-09 19:41   ` Nikolay Kichukov
2020-05-09 20:11     ` Milan Broz
2020-05-10  1:41       ` Chris Murphy
2020-05-09 20:23     ` Chris Murphy
2020-05-09 21:35       ` Nikolay Kichukov
2020-05-09 22:01         ` Milan Broz
  -- strict thread matches above, loose matches on Subject: below --
2020-05-08 21:41 Nikolay Kichukov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).