-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the UAS module to kern module blacklist? #1743
Comments
(also relates to this post I made in the community forums for deeper explanations : https://community.home-assistant.io/t/raspberri-pi-4-9-steps-howto-get-both-hassio-boot-data-run-over-an-ssd/372548) |
Afaik, there are known drives which do work with UAS enabled. I guess they would get slowed down with such a generic ban. I'd rather prefer to have a set of |
Yeah indeed, there are some setups that work. But, this is dependent on a combination of PI version, cable, hub, disk. So a lot can go wrong. The drawback of a generic ban is to lower the potential max throughput of a disk of about 50%, but given the speed of the USB3 bus of a PI, rather 20%. But anyway, there is no need for 50 Mb/s instead of 30 Mb/S on a PI using HA. I'm not even sure a large setup would be able to use 10 Mb/s of throughput. On the other hand, for the people that have issues (not a marginal amount I'd guess), the process of mounting the drive, editing the command line and all is pretty daunting. Beyond the fact that having both boot & data is better, even just migrating the data to an external drive (offered by default by HA) is often failing because of this. So even if its a trade-off, it's lowering unused max perf, in favor of more simplicity (no complicated command to issue for the user to migrate to an SSD or impossible to find combo of cable, hub, drive, pi to make it work) and security (more people using a SSD, vastly more stable and durable than an SDcard) Then if the user wants to get the most out of its disk, it's easier to remove the UAS from the module blacklist for some, than editing the cmdline for most. |
Valid points. What is Raspberry Pi doing on that front? Do they blacklist by default? Did they consider blacklist it? |
Excellent question and I've no good answer to help here. Most use cases of the PI I know about are related to running it on an SDcard. I never really dug into the HDD/SSD problem before falling in love with HA and wanting to have a stable environment to run it. I found a thread here though: raspberrypi/linux#3855 Googling "github: raspberry pi SSD UAS module to kernel blacklist" returned a few results. |
Hm, so they opted to not blacklist Afaik UAS is also used to get TRIM working on SSD, which is rather important for wear-leveling and maintain performance. I wonder if there might not also be drives which only support UAS? @tmm1 do you have thoughts on this? Blocking UAS generally seems like quite a hammer on a technology which should be the future of USB mass storage devices. I kinda tend to follow the Raspberry Pis lead. From this Raspberry Pi forum thread it sounds like the problem is not really on RPi4 side but just bad drives? FWIW, my Samsung USB 3.0 SSD works flawlessly with UAS. |
Seems like the wrong approach to me.
We work with a lot of consumer HDDs and my experience is the opposite. Most of them work just fine, and take advantage of UAS. The problems seems to occur more with older DIY enclosures that people are using for SSDs.
Agree with this, if the goal is to make things easier and work out of the box then we should bundle the list of quirks so most setups work. |
Let's do that then. It seems that the JMicron already make a rather big share of the trouble makers. I found those in the Raspberry Pi Forum where there is also confirmation that those also helped:
|
Thanks guys for considering the request, I'd think your evaluation is very
fair and call it a day then.
If some others are running into the problem and they are the minority, then
they can follow a tutorial indeed.
Keep up the great work team!
(btw we're porting CrowdSec to HA as I speak, more security for the masses)
…On Tue, Feb 8, 2022 at 10:03 PM Stefan Agner ***@***.***> wrote:
Let's do that then. It seems that the JMicron already make a rather big
share of the trouble makers. I found those in the Raspberry Pi Forum where
there is also confirmation that those also helped:
- 152d:0579:u
- 152d:0578:u
- 152d:1561:u e.g. Sabrent USB 3.0 to SATA-III adapter cable
<https://www.amazon.com/dp/B011M8YACM>.
—
Reply to this email directly, view it on GitHub
<#1743 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATTGATKZEWZGM4QVYWZHR5TU2GAKPANCNFSM5N2LNV3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Here are some we are including: fancybits@72b2fde |
hummm indeed, I didn't see those (yet) in my own installation, so I was not
aware you had a manual list, sorry about that.
Well done!
…On Tue, Feb 8, 2022 at 10:16 PM Aman Gupta Karmani ***@***.***> wrote:
Here are some we are including: ***@***.***
<fancybits@72b2fde>
—
Reply to this email directly, view it on GitHub
<#1743 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATTGATMA5YW664YVRUPAOILU2GB2XANCNFSM5N2LNV3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have the StarTech USB-SATA 3.0 adapter and use a Kingston A400 120gb SSD. It works with UAS but after a while the system log in HA is slow to load and with UAS turned off it's now much more responsive.
|
For me this fixed also made a huge difference with displaying the logs. Seems to be the same StarTech adapter. Disk: Crucial BX500 with StarTech.com SATA to USB Cable - USB 3.0 to 2.5" SATA III Hard Drive Adapter
|
Added |
This is interesting. I had to use this quirk in my Argon One M.2 case since HA OS 5.10 I think, because my logs have been really slow to show: home-assistant/supervisor#3014. I also have a Pi 4 4GB inside the Argon One M.2 case but I am using Raspberry Pi OS Bullseye in 32bit. Is is possible that is is a 64bit only problem? Maybe there is somewhere an error in the 64 bit implementation? |
It looks to me like a USB3 power and/or implementation problem. Raspberry is not known to implement the most "by the book" USB hardware and there is also often a power shortage problem. Now to add to this mess, USB3 hubs are usually cheap and poorly designed, here again not very respectful of any norm. Combining the two, you get a very shaky gateway between an exigent SSD drive and an exigent OS. What could possibly go wrong? Well the UAS mode for a start, which is a combo of the old (but good) SCSI norm, adapted to the USB3 bus. It's way better & faster than the older BOT module that was used for this, but it's stricter. And when you get this unlikely teaming between RPI/USB hubs & varying quality of SSD drives, you can caught in this problem. Now honestly deactivating the UAS for an SSD serving HA on an RPi, I'd bet there are very few corner cases where you would feel any performance difference I think. But I totally get the decision of the maintainers to support the majority case and not lose performances over complying even with the unlucky ones but sacrificing perfs. Anyway, this thread (and the one on HA forum) are there to hint the minority users having this problem to a pragmatic solution. |
Another incompatible Adapter: Sold as "UGREEN USB 3.0 SATA Adapter für 2.5 Zoll SSD und HDD Festplatten SATA auf USB Adapter unterstützt SATA III UASP Ruhemodus SMART Trim usw.", bought 07/2022 has the nasty UAS-Incompatibility as well. |
Thanks for your report, this PR adds that device as well: #2310 Ideally new devices should be reported in a new issue, so we have them tracked separately. |
Describe the issue you are experiencing
UAS mode is bringing marginal performance boost to USB disk R/W but the tradeoff is huge since most disks will generate errors on an RPI4 if plugged on the USB bus without patching the kernel command line. Adding the UAS to the module blacklist could maybe help to avoid those errors in the first place.
Actually you have to mount your USB drive boot partition, edit the cmdline and add something like:
usb-storage.quirks="152d:0579:u" dwc_otg.lpm_enable=0 console=tty1
(152d:0579 coming from a lsusb)
While this works, it's still an extra headache for the users, and using an SSD drive is way safer than an SDcard.
What operating system image do you use?
rpi4-64 (Raspberry Pi 4/400 64-bit OS)
What version of Home Assistant Operating System is installed?
7.1
Did you upgrade the Operating System.
No
Steps to reproduce the issue
. . . [sda] tag#27 CDB: opcode=0x28 28 00 00 03 b0 3a 00 00 b0 00
Anything in the Supervisor logs that might be useful for us?
Anything in the Host logs that might be useful for us?
System Health information
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: