DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Testing TRIM with hdparm on dm-crypt
@ 2011-11-09 18:14 Alexander Koch
  2011-11-09 18:54 ` Milan Broz
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Koch @ 2011-11-09 18:14 UTC (permalink / raw)
  To: dm-crypt

Hello everyone,

I'm trying to verify that TRIM is actually working on my dm-crypt (LUKS) 
encrypted LVM volume with the following layers:

   SSD (Crucial M4 128GB) -> LVM -> LUKS -> ext4

I followed the guide available at [1], which includes these steps:

  1) create a random-filled file, sync to disk
  2) fetch LBAs via 'hdparm --fibmap'
  3) pick one sector, raw-read contents with 'hdparm --read-sector'
  4) delete the file, sync to disk
  5) re-read the sector chosen above, verify it contains zeroes

Unfortunately I already get a zeroed sector in step three:

 > $ hdparm --read-sector 271984 /dev/sdd
 >
 > /dev/sdd:
 > reading sector 271984: succeeded
 > 0000 0000 0000 0000 0000 0000 0000 0000
 > 0000 0000 0000 0000 0000 0000 0000 0000
 > 0000 0000 0000 0000 0000 0000 0000 0000
 > 0000 0000 0000 0000 0000 0000 0000 0000
 > (...)


Is there any LBA-calculation I must do because of the LVM layer?


Regards,

lynix



[1] 
http://techgage.com/article/enabling_and_testing_ssd_trim_support_under_linux/2

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

end of thread, other threads:[~2011-11-09 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09 18:14 [dm-crypt] Testing TRIM with hdparm on dm-crypt Alexander Koch
2011-11-09 18:54 ` Milan Broz
2011-11-09 20:25   ` Alexander Koch
2011-11-09 20:58     ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox