/[sysadmin-cookbook]/recepies/ssd/trim-test.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/ssd/trim-test.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (hide annotations)
Wed Sep 14 23:12:34 2011 UTC (12 years, 7 months ago) by dpavlin
File MIME type: application/x-sh
File size: 332 byte(s)
http://techgage.com/article/enabling_and_testing_ssd_trim_support_under_linux/2
1 dpavlin 273 #!/bin/sh -xe
2    
3     # mount /dev/sda2 /mnt -o rw,noatime,discard
4    
5     seq 1 1000 > testfile
6     hdparm --fibmap testfile | tee out.hdparm
7    
8     sector=`cat out.hdparm | tail -1 | awk '{ print $2 }'`
9     hdparm --read-sector $sector /dev/sda > out.$sector.1
10    
11     rm testfile
12     sync
13    
14     hdparm --read-sector $sector /dev/sda > out.$sector.2
15     md5sum out.$sector.[12]

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26