From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WL5_mTLbrFnz for ; Wed, 9 Nov 2011 19:14:41 +0100 (CET) Received: from vserver3082.vserver-on.de (vserver3082.vserver-on.de [109.73.50.87]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 9 Nov 2011 19:14:41 +0100 (CET) Received: from [10.0.0.2] (dslb-088-066-159-250.pools.arcor-ip.net [88.66.159.250]) by vserver3082.vserver-on.de (Postfix) with ESMTPSA id 0A94114E0AF for ; Wed, 9 Nov 2011 19:14:40 +0100 (CET) Message-ID: <4EBAC310.6010104@alexanderkoch.net> Date: Wed, 09 Nov 2011 19:14:40 +0100 From: Alexander Koch MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [dm-crypt] Testing TRIM with hdparm on dm-crypt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de 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