Refer to this archived thread for context:
http://forums.fedoraforum.org/showthread.php?t=278455
I followed the configuration changes outlined in that thread in my F17 installation and it seems I may now have discard support on my luks partition which is on SSD.
Code:
# cryptsetup status luks-cc282d6b-3831-448d-afa8-a53b30ee98e6
/dev/mapper/luks-cc282d6b-3831-448d-afa8-a53b30ee98e6 is active and is in use.
type: LUKS1
cipher: aes-xts-plain64
keysize: 512 bits
device: /dev/sda3
offset: 4096 sectors
size: 330133504 sectors
mode: read/write
flags: discards
So I tried manually running fstrim:
Code:
# time fstrim -v /
/: 132014465024 bytes were trimmed
real 2m39.631s
user 0m0.000s
sys 0m0.814s
Not sure I trust the number of bytes trimmed since its showing about 130G !!
So how do I perform an actual test that I can see the TRIM occur on the encrypted block device? eg: all zeroes
UPDATE: painstakingly I went and followed through all the offsets of all the layers and was able to read a file sector and determine that yes TRIM is working on my LUKS partition.
Hope we see a tool to do this at some point.
.