So I’m coming back to this problem 2 years later.
I’ve moved the SanDisk Extreme 480 to a laptop running Linux (fedora).
I updated the firmware to R211.
smartctl -a /dev/sda | head
smartctl 5.42 2011-10-20 r3458 [x86_64-linux-3.7.3-101.fc17.x86_64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: SanDisk SDSSDX480GG25
Serial Number: XXXXXXXXXXXXXXXXX
LU WWN Device Id: 5 001b44 78eabe2f0
Firmware Version: R211
User Capacity: 480,103,981,056 bytes [480 GB]
Sector Size: 512 bytes logical/physical
But again I see the same problem - TRIM is not working.
Here’s how I’ve been testing TRIM:
seq -f “%03.0f” 0 999 > /boot/testfile
df /boot/testfile
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 495844 130162 340082 28% /boot
filefrag -s -v /boot/testfile
Filesystem type is: ef53
Filesystem cylinder groups is approximately 61
File size of /boot/testfile is 4000 (4 blocks, blocksize 1024)
ext logical physical expected length flags
0 0 15369 3 merged
1 3 15372 1 merged,eof
dd bs=1024 skip=15369 count=1 if=/dev/sda1 | hexdump -C | head
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000316114 s, 3.2 MB/s
00000000 30 30 30 0a 30 30 31 0a 30 30 32 0a 30 30 33 0a |000.001.002.003.|
00000010 30 30 34 0a 30 30 35 0a 30 30 36 0a 30 30 37 0a |004.005.006.007.|
00000020 30 30 38 0a 30 30 39 0a 30 31 30 0a 30 31 31 0a |008.009.010.011.|
00000030 30 31 32 0a 30 31 33 0a 30 31 34 0a 30 31 35 0a |012.013.014.015.|
00000040 30 31 36 0a 30 31 37 0a 30 31 38 0a 30 31 39 0a |016.017.018.019.|
00000050 30 32 30 0a 30 32 31 0a 30 32 32 0a 30 32 33 0a |020.021.022.023.|
00000060 30 32 34 0a 30 32 35 0a 30 32 36 0a 30 32 37 0a |024.025.026.027.|
00000070 30 32 38 0a 30 32 39 0a 30 33 30 0a 30 33 31 0a |028.029.030.031.|
00000080 30 33 32 0a 30 33 33 0a 30 33 34 0a 30 33 35 0a |032.033.034.035.|
00000090 30 33 36 0a 30 33 37 0a 30 33 38 0a 30 33 39 0a |036.037.038.039.|
rm /boot/testfile
rm: remove regular file `/boot/testfile’? y
sync
fstrim -v /boot
/boot: 1907712 bytes were trimmed
dd bs=1024 skip=15369 count=1 if=/dev/sda1 | hexdump -C | head
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 3.7879e-05 s, 27.0 MB/s
00000000 30 30 30 0a 30 30 31 0a 30 30 32 0a 30 30 33 0a |000.001.002.003.|
00000010 30 30 34 0a 30 30 35 0a 30 30 36 0a 30 30 37 0a |004.005.006.007.|
00000020 30 30 38 0a 30 30 39 0a 30 31 30 0a 30 31 31 0a |008.009.010.011.|
00000030 30 31 32 0a 30 31 33 0a 30 31 34 0a 30 31 35 0a |012.013.014.015.|
00000040 30 31 36 0a 30 31 37 0a 30 31 38 0a 30 31 39 0a |016.017.018.019.|
00000050 30 32 30 0a 30 32 31 0a 30 32 32 0a 30 32 33 0a |020.021.022.023.|
00000060 30 32 34 0a 30 32 35 0a 30 32 36 0a 30 32 37 0a |024.025.026.027.|
00000070 30 32 38 0a 30 32 39 0a 30 33 30 0a 30 33 31 0a |028.029.030.031.|
00000080 30 33 32 0a 30 33 33 0a 30 33 34 0a 30 33 35 0a |032.033.034.035.|
00000090 30 33 36 0a 30 33 37 0a 30 33 38 0a 30 33 39 0a |036.037.038.039.|
And as you can see - no TRIM occurred.
.