Solved Can You Trim A Portable SSD ?

Solved issue

bob466

Well-Known Member
Joined
Oct 22, 2020
Messages
1,879
Reaction score
1,493
Credits
13,635
Some time ago I purchased a 1TB portable SSD to replace my portable HDD for storing my images.
Portable SSD is formatted to EXT4.

The SSD works well and has never given me any trouble...every now and then I'd plug it into the USB port and run the Trim command.
About a week ago I thought...How do I know it's being Trimmed...so I ran this command with the portable SSD plugged in.
Code:
lsblk --discard
This is the result...
1712706461442.png

The SSD isn't showing. sda1,sda2 is my internal 500GB SSD and sdg1 shown by the zeroes is my portable SSD...so it's not being Trimmed and we all know what means.
Research on line was no help...some claim there's a fix...some say it's the USB port and others the SSD controller.

So I decided to try something...I have an old Drive Enclosure...it holds a HDD or SSD. I took an unused new internal 500GB SSD and placed it in the Enclosure...plugged it into the same USB port and ran the command...
1712708191800.png

It showed up...I then took my spare 500GB internal SSD with Mint Cinnamon 21.1 on it...then ran the Trim command...
1712708517334.png


All Drives were Trimmed...so what does this mean ? Well for me it's no more portable SSDs...can't take the chance with my images. I'll either buy an internal 1TB SSD and put it in the Drive Enclosure where it can be trimmed or use my portable 2TB HDD.

If anyone knows a fix please let me know...I wonder how many people who have Portable SSDs know about this ?
1712709939667.gif
 
Last edited:


This guy is pretty smart... (I haven't tested yet. I only have one external SSD and it's on the other side of the house.)


I'd note the use of the sudo su at the start. It's for a Pi but the logic seems sound. They're using something Debian-based.

He does a lot with the Pi SBCs on YouTube. He's an electrical engineer like his dad - I think.
 
I think I've found the answer...it's knowing which command to run.
1712792179296.gif

Sounds stupid but that's exactly the case here.
On the net everyone has a different opinion...so it's up to us to work it out and I think I have. Is my portable 1TB SSD supported...I run this command...
Code:
lsblk
1712792707875.png
yes it is.

We have two Trim commands...one for Internal SSDs and one for all internal and External SSDs.
1712793043253.gif

This is the Internal command...
Code:
sudo fstrim -av
This is the External command...
Code:
sudo fstrim / -v

1712794226838.png


I ran the External command several times so there's nothing left to Trim...then the Internal command...as we can see both don't do the same job. The worst part is running sudo fstrim -av manually thinking your portable SSD is being Trimmed...then it suddenly stops never to go again.
t3603.gif
 
I wonder how many people who have Portable SSDs know about this ?
I have 3. One of those is a SSD filled with movies. Copies as a backup in case my property aka physical DVDs gets scratched.
It is safer on a HDD also long-term... but

Do I have to trim that ssd ?
What happens if I don't ?
 
The Arch Wiki offers this below (and see their other warnings):
Warning: Users need to be certain that their SSD supports TRIM before attempting to use it. Data loss can occur otherwise!

Crucial, a well-known name in SSD's and memory says this about trim:
Trim is beneficial, but not mandatory. Because some operating systems do not support Trim, SSD manufacturers design, create, and test their drives assuming that Trim will not be used.

I do not manually trim my drives. But I probably re-format more often than most people. ;)
 
I've written a wee utility for the Puppy community, a couple of years ago, which allows the user to manually trim their SSD on an as-and-when basis. The recommendation, for an SSD that's in regular daily use - say, as the user's primary storage drive - is to perform the operation no more than once a week.

I have 2 SSDs currently (well, 3 if you include the one on the old Dell Latitude that I got a couple of years ago). One, a 1 TB Crucial MX500, is my primary drive on the HP desktop rig. This is a standard SATA 3 device, and supports the T.R.I.M operation.

The second in use here is an elderly 64 GB KingSpec PATA/IDE interface SSD. This is the one that I used to run in the even older Dell Inspiron 1100 that preceded the Lat.....and has now been re-purposed , within a custom enclosure, for running Haiku OS. This gets connected to the system via a PATA-to-SATA converter and a USB-to-SATA cable as & when I decide to play around with Haiku.

This doesn't support T.R.I.M, although its controller does have a "rubbish collection" routine.

Since Puppy doesn't employ systemd, we can't set T.R.I.M to run in the background as part of systemd's regular runtime background jobs. It is, however, possible to set it up as a cron job through the command-line if desired.....

Mike. :)
 
Last edited:
I have 3. One of those is a SSD filled with movies. Copies as a backup in case my property aka physical DVDs gets scratched.
It is safer on a HDD also long-term... but

Do I have to trim that ssd ?
What happens if I don't ?

I also have a 1TB SSD with movies too...just Trimmed it...
1712808101585.png

As you can see 15.2GB trimmed. Do you have to Trim it...yes. What happens if you don't...start saving for another one.
1712808625218.gif

This might be of help...https://ssdsphere.com/trim/

Run the command in post 3 to see if it's supported...it should be...then run the command shown above. Does formatting matter...no. One portable SSD is EXT4 and the other Fat32...my Internal SSD is set to run Trim everyday with no problems.

From now on I'll run Trim on both my portable SSDs at least once a week...while I'm doing that I'll do the Internal one too.
m1212.gif
 
...start saving for another one.
1712808625218.gif
I will keep that in mind :)

In 2015( 9 years ago) I bought a Kingston HyperX Fury SSD.
I was a "hardcore" gamer, playing with my buddies War Thunder
One of my friends said "Don't use your XP because you will ruin the ssd"
I don't know if W7 trim was running in the background... :confused:
After that W7, I had a Arch install then uMbuntu, Mint and now is a Pop_OS 20.04 on it.
NEVER enabled trim on this ssd, and you know what... it feels the fastest of all of them.
Ask me why....:confused:

Does formatting matter...
It matters... to TBW
 
People are free to do whatever they like...run Trim or don't.
1712876915812.gif


It matters... to TBW
Really...over the last week of research, I never saw that anywhere.
t1844.gif


Anyway I had a problem and now I don't, so I'm marking this as solved...I hope this helps someone.
m1212.gif
 

Staff online


Top