19.01.2019 10:12, Andrei Borzenkov пишет:
17.01.2019 23:51, Matthias Bach пишет:
Hi,
On multiple of my machines I have the root filesystem on a dm-crypt device placed on an SSD. Now, I would like to use `fstrim /`. Now, I know about the security implications. But, as encryption for me primarily is a way to be able to throw out disks without further effort, I don't consider those a problem for me.
Sadly, on any system I installed directly with Leap 15.0 I cannot get this to work. Despite having `rd.luks.options=discard` in my kernel arguments I get the following output from `lsblk`:
# lsblk --discard /dev/sda NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO sda 0 512B 2G 0 ├─sda1 0 512B 2G 0 ├─sda2 0 512B 2G 0 └─sda3 0 512B 2G 0 └─cr_sda3 0 0B 0B 0
Curiously the same works on a different systems which has been upgraded through various versions of Leap and is now also running on 15.0.
# lsblk --discard /dev/sda NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO sda 0 512B 2G 0 ├─sda1 0 512B 2G 0 ├─sda2 0 512B 2G 0 ├─sda3 0 512B 2G 0 ├─sda4 0 512B 2G 0 ├─sda5 0 512B 2G 0 └─sda6 0 512B 2G 0 └─luks-081…3e1 0 512B 2G 0
The only difference I can see between the systems is, that the older system uses the UUID instead of the name, and for some reason the newer system does have the device containing root in `/etc/crypttab` while the old system does not.
Any hints on what might be causing the different behavior?
Different configuration?
Please show from each system
/etc/fstab /etc/crypttab lsinitrd /boot/initrd lsinitrd /boot/initrd etc/cmdline.d/\*
(yes, last command is exactly as given, it shows content of files).
I am not surprised you have no discards; I am surprised where discards come from.
Could you please also show dmsetup table cat /proc/cmdline from each system.