Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB to SATA Bridges
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Wed May 24, 2017 7:02 pm    Post subject: USB to SATA Bridges Reply with quote

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
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 445

PostPosted: Wed May 24, 2017 8:04 pm    Post subject: Re: USB to SATA Bridges Reply with quote

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
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Thu May 25, 2017 1:38 am    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Thu May 25, 2017 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
wildhorse
Apprentice
Apprentice


Joined: 16 Mar 2006
Posts: 150
Location: Estados Unidos De América

PostPosted: Fri May 26, 2017 9:43 am    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54810
Location: 56N 3W

PostPosted: Fri May 26, 2017 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum