Linux Mint on m.2 SSD removable enclosure (USB)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Firefairy
Level 1
Level 1
Posts: 18
Joined: Sun Dec 12, 2010 2:52 pm

Linux Mint on m.2 SSD removable enclosure (USB)

Post by Firefairy »

I know that installing Mint on a USB stick has been brought up before, and the basic response I have seen is essentially "don't, it will burn your USB stick way too fast". However, it is now within feasibility to build a USB stick with a proper hard drive in nicely pocket-sized enclosure, and I am curious as to how such an install would work out.

I have the impression that a lot of other issues could have been ignored due to the basic hardware limitations of most thumb drives with regard to wear leveling, so I would like to know if there would be issues with changing drive locations and hardware specs, accessing both files carried with the OS and those on the host computer, and so on.

Basically, if the issue of burning out the drive was removed as a major factor, what other issues are there, and how might they be handled?

User avatar
catweazel
Level 19
Level 19
Posts: 9890
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by catweazel »

Firefairy wrote:
Sun Apr 01, 2018 6:40 am
However, it is now within feasibility to build a USB stick with a proper hard drive in nicely pocket-sized enclosure, and I am curious as to how such an install would work out.
The Corsair Voyager GTX 128gb USB 3 SSD works fine for me. Under $US100.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by darethehair »

Since I had a spare M.2 drive from a Chromebook, I put it into a USB 3.0 mini-enclosure and loaded Mint onto it (LMDE specifically). I made the recommended OS tweaks to reduce unnecessary logging and writing. However, AFAIK, most USB enclosures do NOT support the 'TRIM' commands that are required to optimize the use of the SSD.
There is nothing more dangerous than a bored cat.

Firefairy
Level 1
Level 1
Posts: 18
Joined: Sun Dec 12, 2010 2:52 pm

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by Firefairy »

catweazel wrote:
Sun Apr 01, 2018 6:56 am

The Corsair Voyager GTX 128gb USB 3 SSD works fine for me. Under $US100.
Does the SSD-style controller include good wear-leveling so that the relatively rapid read-write cycle does not wear out the drive as quickly?

Firefairy
Level 1
Level 1
Posts: 18
Joined: Sun Dec 12, 2010 2:52 pm

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by Firefairy »

darethehair wrote:
Sun Apr 01, 2018 5:47 pm
Since I had a spare M.2 drive from a Chromebook, I put it into a USB 3.0 mini-enclosure and loaded Mint onto it (LMDE specifically). I made the recommended OS tweaks to reduce unnecessary logging and writing. However, AFAIK, most USB enclosures do NOT support the 'TRIM' commands that are required to optimize the use of the SSD.
Hm, so command capability would be major factor in optimization. That makes sense. What would be the effect of lacking the TRIM commands? Just bloat, or something worse?

User avatar
catweazel
Level 19
Level 19
Posts: 9890
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by catweazel »

Firefairy wrote:
Sun Apr 01, 2018 6:04 pm
Does the SSD-style controller include good wear-leveling so that the relatively rapid read-write cycle does not wear out the drive as quickly?
That's why it has an SSD controller.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by darethehair »

Firefairy wrote:
Sun Apr 01, 2018 6:06 pm
Hm, so command capability would be major factor in optimization. That makes sense. What would be the effect of lacking the TRIM commands? Just bloat, or something worse?
I believe that it is TRIM functionality that allows no-longer-used blocks to become available again for re-use. So my assumption is that over time -- without regular TRIM commands -- that the SSD would 'fill up' even though there might be space available from deleted blocks or files. In the meantime, though, my external SSD works just fine -- and fast -- but I am reluctant to use it a lot with that limitation.
There is nothing more dangerous than a bored cat.

User avatar
catweazel
Level 19
Level 19
Posts: 9890
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by catweazel »

darethehair wrote:
Sun Apr 01, 2018 7:26 pm
So my assumption is that over time -- without regular TRIM commands -- that the SSD would 'fill up'
Invalid assumption. What TRIM does is clear unused blocks that have previously had data written to them, also called 'dirty blocks'. It also merges partial blocks into single blocks. This speeds up writes to the SSD because the controller doesn't have to spend time clearing dirty blocks and performing merges during write operations. Merges of partial blocks are performed because the whole block has to be erased when just a single bit changes, which is a very costly process when writing to untrimmed, unmerged blocks.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
darethehair
Level 4
Level 4
Posts: 239
Joined: Sun Mar 08, 2009 2:22 pm
Location: Morden Manitoba Canada
Contact:

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by darethehair »

catweazel wrote:
Sun Apr 01, 2018 7:49 pm
darethehair wrote:
Sun Apr 01, 2018 7:26 pm
So my assumption is that over time -- without regular TRIM commands -- that the SSD would 'fill up'
Invalid assumption. What TRIM does is clear unused blocks that have previously had data written to them, also called 'dirty blocks'. It also merges partial blocks into single blocks. This speeds up writes to the SSD because the controller doesn't have to spend time clearing dirty blocks and performing merges during write operations. Merges of partial blocks are performed because the whole block has to be erased when just a single bit changes, which is a very costly process when writing to untrimmed, unmerged blocks.
You know more than I do on this subject, but wouldn't the inability to 'clear unused blocks that have previously had data written to them' eventually lead to the SSD filling up?
There is nothing more dangerous than a bored cat.

User avatar
catweazel
Level 19
Level 19
Posts: 9890
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Linux Mint on m.2 SSD removable enclosure (USB)

Post by catweazel »

darethehair wrote:
Sun Apr 01, 2018 8:04 pm
catweazel wrote:
Sun Apr 01, 2018 7:49 pm
darethehair wrote:
Sun Apr 01, 2018 7:26 pm
So my assumption is that over time -- without regular TRIM commands -- that the SSD would 'fill up'
Invalid assumption. What TRIM does is clear unused blocks that have previously had data written to them, also called 'dirty blocks'. It also merges partial blocks into single blocks. This speeds up writes to the SSD because the controller doesn't have to spend time clearing dirty blocks and performing merges during write operations. Merges of partial blocks are performed because the whole block has to be erased when just a single bit changes, which is a very costly process when writing to untrimmed, unmerged blocks.
You know more than I do on this subject, but wouldn't the inability to 'clear unused blocks that have previously had data written to them' eventually lead to the SSD filling up?
No. Once a block is no longer used, it is marked as free. Without TRIM, the SSD simply slows down, as I described.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

Post Reply

Return to “Installation & Boot”