View previous topic :: View next topic |
Author |
Message |
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Wed May 24, 2017 7:02 pm Post subject: USB to SATA Bridges |
|
|
Team,
I have a USB powered USB3.1 to SATA bridge that I use ta attach an SSD to a Raspberry Pi. The Pi does not power the SSD.
The SSD supports trim but the USB to SATA bridge does not. I suitably panned it in my Amazon review :)
I can work around the missing trim by fitting the SSD to a computer without the USB bridge, mounting the filesystems and running fstrim.
So far so good. It a bit of a faff but should work.
However, swap is on the SSD too. It not mounted, its not a filesystem ... how do I trim that?
The raspberry Pi can use a lot of swap too.
If anyone knows a USB3 to SATA bridge that deals with SSDs properly, I would be pleased to hear about it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Maitreya Guru
Joined: 11 Jan 2006 Posts: 445
|
Posted: Wed May 24, 2017 8:04 pm Post subject: Re: USB to SATA Bridges |
|
|
NeddySeagoon wrote: | ...
However, swap is on the SSD too. It not mounted, its not a filesystem ... how do I trim that?
The raspberry Pi can use a lot of swap too.
|
You don't. You can't as there is no record left of what was written.
And the usb conversion removes discard support as well.
Maybe try blkdiscard |
|
Back to top |
|
|
s4e8 Guru
Joined: 29 Jul 2006 Posts: 311
|
Posted: Thu May 25, 2017 1:38 am Post subject: |
|
|
Some bridge with proper firmware support TRIM, through you need access it using UAS driver.
Code: |
# sdparm -i --page=lbpv /dev/sdh
/dev/sdh: TOSHIBA THNSNS128GMCP 0
Logical block provisioning (SBC) VPD page:
Unmap command supported (LBPU): 1
Write same (16) with unmap bit supported (LBWS): 0
Write same (10) with unmap bit supported (LBWS10): 0
Logical block provisioning read zeros (LBPRZ): 0
Anchored LBAs supported (ANC_SUP): 0
Threshold exponent: 0
Descriptor present: 0
Minimum percentage: 0
Provisioning type: 0
Threshold percentage: 0
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Thu May 25, 2017 3:43 pm Post subject: |
|
|
Maitreya,
I've discovered that swap is mounted with discard options automatically, so while I'm running fstrim, I can do a swapon too.
Unfortunately, it will need to be every boot, or ever more often as swap is used a lot on a Raspberry pi.
s4e8,
I'm not using the UAS driver as far as I know. I'll look into it.
That. would be a much better solution.
Thank you both. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
wildhorse Apprentice
Joined: 16 Mar 2006 Posts: 150 Location: Estados Unidos De América
|
Posted: Fri May 26, 2017 9:43 am Post subject: |
|
|
I replaced my first Raspberry Pi with a Banana Pi a long time ago. By now I have a little farm of Banana Pi (model 1!), Pro and Router (all running a kernel version 4.11). If that is an option for you, then be careful, because a later model (3?) of the Banana actually comes with an internal USB to SATA bridge. Personally, I find life too short for bad wine and USB-SATA bridges. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54810 Location: 56N 3W
|
Posted: Fri May 26, 2017 9:56 am Post subject: |
|
|
wildhorse,
When I can get a real arm64 system for sensible money in the UK, I intend to get one.
There have been a few that have been stillborn, so I'll use the Pi until then.
It needs to have at least 1G RAM per core. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|