I have a compact SoC (System On a Chip) Dell laptop with the DF4032 SanDisk eMMC 32 GB storage device soldered to its only PCB, and there is no information concerning TRIM support for it anywhere. The file fstrim is present at /etc/cron.weekly/

# trim all mounted file systems which support it
/sbin/fstrim --all || true

Running fstrim manually returns "30 GB ('N' bytes) trimmed" (apparently working, right?)

sudo hdparm -I /dev/mmcblk0 | grep "TRIM supported" 

BUT the above command returns

HDIO_DRIVE_CMD(identify) failed: Invalid argument

So how else can I check if Ubuntu is performing TRIM out-of-the-box for this eMMC or if it even supports it? Would it be safe to include --no-model-check on the fstrim file? I would need to specify the /dev/mmcblk0 device so it would not mess with the SDHC card inserted. TRIM can be deadly for some not so popular devices.

  • What is /dev/mmcblk0? The message you see is printed to standard error. Since standard output is being filtered by grep and no lines match your pattern, all you see is the error. What is it that is confusing you? – terdon Jun 29 '16 at 15:18
  • what is mmcblk0 and how did you decide that was the device it uses? Besides that: emmc is equal to a ssd? trim is for ssd's. – Rinzwind Jun 29 '16 at 15:18
  • /dev/mmcblk0 is the main (eMMC) device. Its partitions are /dev/mmcblk0p1, ~p2, ~p3, etc. eMMC devices are named that way. No /dev/sda here. I just want to make sure TRIM is supported and enabled. TRIM extends flash drive lifespan by cleaning deleted files from the cells before you need to use it again (which keeps it from slowing the system down). – Henry J. Douglas Jun 29 '16 at 15:22
  • It's a smaller, cheaper type of SSD for low cost devices. For instance, android smartphones, tablets and most embedded systems use eMMC. – Henry J. Douglas Jun 29 '16 at 15:27

TRIM does not work through USB, but usually, you get a message about "unsupported ioctl" when you run it on such a device (external USB disk enclosure). Confirm that your mmcblk0 is really not on USB:


My SD cards on mmcblk0 do not list a TRAN, but seem to appear under the USB branch since it follows a USB. However, adding the SUBSYSTEMS shows they are not on the USB. Probably there is not an issue with TRIM on your device if you get no errors or complaints. My output:

sata   block:scsi:pci         sdb       disk
       block:scsi:pci         sdb1      part
       block:scsi:pci         sdb2      part
       block:scsi:pci         sdb3      part
usb    block:scsi:usb:pci     sdc       disk
       block:scsi:usb:pci     sdc1      part
       block:mmc:mmc_host:pci mmcblk0   disk
       block:mmc:mmc_host:pci mmcblk0p1 part
       block:mmc:mmc_host:pci mmcblk0p2 part
  • The "usb" does not appear where /dev/mmcblk0 is. The only thing with "usb" under TRAN is my SDHC card, which is /dev/sda. If you need to see the output, I'm gonna need help pasting the code somewhere you can see. I can't set it to display correctly here. As far as I know, this eMMC device is soldered on the PCB and cannot be removed. – Henry J. Douglas Jun 29 '16 at 19:31
  • My output shows the same. The mmcblk0 is not on USB. It could be unsupported by hdparm, but supported by fstrim, which is good. I think time will tell if it's trimming the drive or not (: Thanks anyway! – Henry J. Douglas Jun 30 '16 at 0:27
  • Do maintain good backups. When they go, they go fast. Had a 60G stop working after 9mo -- apparently W10 wasnt running trim, put it into another pc and trim reported 18Exa bytes trimmed! (or attempted I guess). – ubfan1 Jun 30 '16 at 4:18
  • I will. That's a very short life. And I've been writing many gigabytes to it recently, experimenting with different distributions. Yesterday I ran sudo fstrim -v / and it said 30 GB trimmed. I just did it again and it said 19.8 GB trimmed. Then few seconds later: 0 bytes trimmed. I'm not familiar with the operation, but that's a lot of data for a short interval. – Henry J. Douglas Jun 30 '16 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.