3

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/

#!/bin/sh
# 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.

1 Answers1

1

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:

lsblk -o TRAN,SUBSYSTEMS,NAME,TYPE

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
JepZ
  • 213
ubfan1
  • 19,049