I have installed one SSD disk (Micron C400-MTFDDAC128MAM) in an external USB 3.0 enclosure. Now I want use this disk as a second disk in my laptop with Ubuntu 12.04. The disk is working, but I want to use TRIM support which is not working as expected.
Checking for TRIM support:
user@server:~$ sudo hdparm -I /dev/sdc | grep -i TRIM
* Data Set Management TRIM supported (limit 8 blocks)
* Deterministic read data after TRIM
Disk was mounted with the following options:
/dev/sdc1 on /media/MICRON type ext4 (rw,nosuid,nodev,uhelper=udisks)
But when I run the TRIM command manually, I get an error:
user@server:~$ sudo fstrim -v /media/MICRON/
fstrim: /media/MICRON/: FITRIM ioctl failed: Operation not permitted
I used this disk before as an internal disk and TRIM was working.
Here are some USB details:
[ 1039.248050] usb 4-1: new SuperSpeed USB device number 4 using xhci_hcd
[ 1039.265597] scsi8 : usb-storage 4-1:1.0
[ 1041.547879] scsi 8:0:0:0: Direct-Access C400-MTF DDAC128MAM 0509 PQ: 0 ANSI: 5
[ 1041.549134] sd 8:0:0:0: Attached scsi generic sg2 type 0
[ 1041.550511] sd 8:0:0:0: [sdc] 250069680 512-byte logical blocks: (128 GB/119 GiB)
[ 1041.550778] sd 8:0:0:0: [sdc] Write Protect is off
[ 1041.550785] sd 8:0:0:0: [sdc] Mode Sense: 23 00 00 00
[ 1041.552520] sd 8:0:0:0: [sdc] No Caching mode page present
[ 1041.552528] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 1041.554029] sd 8:0:0:0: [sdc] No Caching mode page present
[ 1041.554035] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 1041.678373] sdc: sdc1
[ 1041.679982] sd 8:0:0:0: [sdc] No Caching mode page present
[ 1041.679991] sd 8:0:0:0: [sdc] Assuming drive cache: write through
[ 1041.679997] sd 8:0:0:0: [sdc] Attached SCSI disk
How to find out if the mass storage device uses the UASP (USB Attached SCSI Protocol) which should support TRIM?