If you’re using the official
Raspberry Pi Flash Drive
and you’re seeing messages about TRIM/Discard or
SMART health checks, your drive is usually fine.
These messages are normally caused by how Raspberry Pi OS (Linux)
handles certain USB storage features.
This article explains what’s happening, what’s being worked on, the
current workaround, and the limitations that won’t change.
🧩 What’s the issue?
Some customers run drive “health” or “maintenance” checks and see messages like:
-
TRIM/Discard:“the discard operation is not supported”
when running
fstrim -
SMART: an
“Unknown USB bridge”
message
when running
smartctl
In plain terms: your Raspberry Pi can still boot from the flash drive and use it for storage normally. These messages usually only affect optional “housekeeping” features that help some flash/SSD-style drives stay fast and healthy over time.
TRIM is a housekeeping instruction that tells the drive “these blocks are free now” so it can manage space efficiently. SMART is a set of health readings (similar to a “status report”).
✓ Good news: If the flash drive is working and you’re not specifically troubleshooting TRIM/SMART, you can usually ignore these messages.
🛠️ What’s being worked on?
Raspberry Pi OS is adding a built-in fix to make TRIM work properly on the official Raspberry Pi Flash Drive. The underlying reason this is needed is that Linux is very cautious about TRIM over USB: many USB drives incorrectly claim TRIM support, and enabling it “globally” can cause freezes, corruption, or even bricked devices. So instead, the OS enables it only for specific known-good models.
The Raspberry Pi OS team has merged a change to add a small system rule that explicitly enables TRIM for the Raspberry Pi Flash Drive and sets safe limits for how TRIM is issued.
✓ Recommendation: Keep your Raspberry Pi OS up to date. Once the update reaches your OS version, TRIM should work without doing anything manually.
✅ Current workaround (enable TRIM now)
If you need TRIM working immediately (for example, you’re using the flash drive heavily and want to run TRIM checks), you can add a small rule on Raspberry Pi OS that enables TRIM for this specific drive.
- Open a terminal on your Raspberry Pi.
-
Create a rules file (this is a standard system
folder
for device rules):
sudo nano /etc/udev/rules.d/86-rpi-trim.rules
-
Paste the following content into the file, then
save and exit:
ACTION=="add", ATTRS{manufacturer}=="Raspberry Pi", ATTRS{product}=="USB Flash Drive", \ SUBSYSTEM=="scsi_disk", \ RUN+="/usr/bin/sh -c 'sleep 1 && udevadm trigger --action=change --subsystem-match=scsi_disk'" ACTION=="change", ATTRS{manufacturer}=="Raspberry Pi", ATTRS{product}=="USB Flash Drive", \ SUBSYSTEM=="scsi_disk", ENV{RPI_TRIM_SET}!="1", \ ENV{RPI_TRIM_SET}="1", ATTR{provisioning_mode}="unmap", \ RUN+="/usr/bin/sh -c 'udevadm trigger --action=change --subsystem-match=block --property-match=ID_USB_MODEL=USB_Flash_Drive'" ACTION=="change", ATTRS{manufacturer}=="Raspberry Pi", ATTRS{product}=="USB Flash Drive", \ KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", \ ATTR{queue/discard_max_bytes}="1073741824" -
Reload the rules:
sudo udevadm control --reload-rules
- Reconnect or reboot: unplug and plug the flash drive back in, or reboot your Raspberry Pi.
To undo this workaround later, delete the file
/etc/udev/rules.d/86-rpi-trim.rules
and reboot.
⚠️ Note: If you’re not comfortable editing system files, it’s OK to skip this. Your flash drive should still work normally, and you can wait for the Raspberry Pi OS update that includes the built-in fix.
🔍 How to confirm TRIM is working
The rule above enables TRIM support, but it doesn’t “instantly trim” the drive. TRIM happens when your system runs a trim command (manually or on a schedule).
A simple check is to run
fstrim
on the drive’s mount point:
# If the flash drive is your boot drive: sudo fstrim -v / # If it’s mounted elsewhere (example path): sudo fstrim -v /media/pi/FLASH
If TRIM is working, you’ll usually see a message showing how much space was trimmed. If you still see “the discard operation is not supported”, TRIM isn’t enabled yet.
✓ Tip: We generally recommend occasional TRIM
(via
fstrim)
rather than enabling a “discard on every delete” mount option,
which
can slow things down.
📊 SMART health checks (what to expect)
The Raspberry Pi Flash Drive supports SMART health reporting, but some SMART tools don’t automatically recognise the USB controller in the drive. That’s why you might see an “Unknown USB bridge” type message when running a basic SMART command.
If you’re comfortable using the terminal, you can often read basic
SMART
attributes by telling
smartctl
which access method to use:
# Replace sdX with your drive (for example: sda, sdb) sudo smartctl -d sat,12 -a /dev/sdX
It’s normal for some SMART features (like built-in short/long self-tests) to be unavailable on this drive.
⚠️ Limitation: SMART self-tests (for example,
smartctl -t short
/
-t long)
are not supported on this model. This is expected and won’t be
fixed
by a software update.
🔒 Limitations that won’t change
A few parts of this behaviour are expected, and are unlikely to change:
- TRIM won’t be auto-enabled for every USB drive. Linux is cautious here because some USB storage devices misreport TRIM support and can behave badly when TRIM is enabled.
- TRIM has to be issued in smaller chunks. On this drive, very large TRIM requests can fail over USB, so the workaround/fix sets a safe maximum size (you’ll see this as a 1GB limit).
- SMART self-tests/logs aren’t available. You can read basic health attributes, but some SMART functions won’t work on this model.
✓ Further reading: If you’d like the upstream technical detail, see the Raspberry Pi forum thread and the Raspberry Pi OS change at raspberrypi-sys-mods PR #108.