All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Koch <mail@alexanderkoch.net>
To: dm-crypt@saout.de
Subject: [dm-crypt] Testing TRIM with hdparm on dm-crypt
Date: Wed, 09 Nov 2011 19:14:40 +0100	[thread overview]
Message-ID: <4EBAC310.6010104@alexanderkoch.net> (raw)

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

             reply	other threads:[~2011-11-09 18:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 18:14 Alexander Koch [this message]
2011-11-09 18:54 ` [dm-crypt] Testing TRIM with hdparm on dm-crypt Milan Broz
2011-11-09 20:25   ` Alexander Koch
2011-11-09 20:58     ` Milan Broz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBAC310.6010104@alexanderkoch.net \
    --to=mail@alexanderkoch.net \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.