External eSATA hard drive not recognized

I have a problem with an external (which is actually internal) hard drive connected to laptop through eSATA port. Fedora didn’t identify it when I turned its power block on, so I searched for a way to make Fedora find the disk and found the command:

echo “- - -” > /sys/class/scsi_host/$HOST/scan

But even with sudo crappy bash refused to execute (WTF?). So I had to relogin as root (which I wisely left enabled during installation), executed it for each of the 6 hosts and on the last one the disk was found. Then i found out that there is a Red Hat sg3_utils with a script for SCSI bus rescanning. So I created this and put it on the desktop:

#!/bin/bash
#Rescan host5 of SCSI bus to discover external hard drive
sudo rescan-scsi-bus.sh --hosts=host5

I wanted to call this script every time I turn on the hard drive. But next time I did it nothing happened. I tried running it manually for every one of the six hosts - nothing (0 devices found). What the shit is going on? I won’t login as root every time to fetch the disk.

Welcome @federal to ask :fedora:

This is a bit confusing!
Booting a fedora install has nothing to do with other hosts, unless the drive is externally mounted with nfs or smb or similar.

You say this drive is eSATA and internal on a laptop, which is also confusing.

Scanning a scsi bus is only pertinent on the current host.
Thus when you say you scanned the bus for 6 different hosts it seems unusual at best.

Please provide the output of lspci, lsusb, lsblk, and sudo fdisk -l so we can see what hardware the system sees and configures at boot time. Use the </> Preformatted text tags with those outputs so we can see the results the same as you do on screen.

1 Like

What is confusing is your answer actually.
“Booting a fedora install” - what does it mean? I didn’t manage to decrypt.
This drive I’m talking about is connected to eSATA, but it is not an external drive by design, it’s a usual SATA drive for the desktop which I turned into external by putting it on the table and connecting to a laptop with SATA-eSATA cable (and to an old desktop power block).

I don’t know what “current host” means. In the aforementioned folder I see several hosts numbered from 0 to 5 and there’s no indication which is current.
And I don’t understand why you are asking about boot time when I was telling you about turning on the drive on an already booted system. If I turn it on before booting, the drive is recognized and partitions are shown on the desktop.

That makes it an external eSATA drive and thus the comment about internal makes no sense and is only confusing.

“at boot time” → when the computer is booted
Thus I am asking about what the computer sees at the time it is booted.

Your comments above do give us a lot more info and clarify some of what was confusing in your first post.

If I now understand correctly, you are asking about why an externally connected eSATA drive is not automatically seen when it is not powered on at time of boot but is later connected (powered on).

AIUI the system only scans the sata bus and configures attached devices during the boot and never does so afterward. Devices attached to eSATA are sata devices and fall into this same category.

There are tools to connect/disconnect eSATA devices though I have never used them. My desktop has an eSATA port on the mobo but nothing attached to it.

This search how to connect esata external hard drive linux gives me more than 800,000 links and I have not read them. This one seems like it may be promising.

That is correct.

That is obvious from my situation.

If I could find the answer on the search engine, I wouldn’t come here with a question. And the fact that I did implies that I haven’t found the answer there.

Arguing achieves nothing.
Posting the info asked for may allow us to assist.

I still don’t really get it either but maybe they are looking for something like that:
https://icybox.de/product-list.php?id=1
This link is not meant to be an advertisement for a manufacturer!

I myself have been using something like this for a long time:
https://icybox.de/product.php?id=182
And that without problems. The little bit of software in between probably solves your problem.
But I just wanted to throw this into the room.

Very relevant remark.

I’m not looking for any extra device, I want to solve the problem with software methods.

If you run a cable past the PC case and demand that the mainboard does what you ask, you are being naive!

Fedora cannot rewrite the motherboard software because they want to! There are international rules in this regard, which also mainly Microsoft has in its pocket.

What do you mean by “past PC case”? I connect the drive to the laptop port, which is not past, but through.

So what is it? No more ideas?

Please try both way and let us know if it makes a difference:

  1. Boot Fedora without the eSATA drive connected. Once Fedora is up and running, hotplug the eSATA drive and see what happens

  2. With your machine powered off, connect the eSATA drive (power the drive up). Turn on your machine and boot Fedora and see what happens.

I once had a very old Dell notebook with eSATA port, hotplug works in Windows 10. But not working with Fedora.

Coldplug works with Fedora.

Tried that already as I explained in previous posts.

  1. nothing happens
  2. Fedora recognizes the drive

And indeed it works on my Windows, which is old 7 by the way. So I want some button in Fedora to click to find the drive after connection.

See if the power management applies to your situation or not:

https://forums.gentoo.org/viewtopic-t-1118384-start-0.html

|[![Post\|12x9](https://forums.gentoo.org/templates/gentoo/images/icon_minipost.gif "Post")](https://forums.gentoo.org/viewtopic-p-8499974.html?sid=410650c5d67a8cc496d46b6232a791b0#8499974)Posted: Tue Sep 15, 2020 12:32 pm Post subject: Solved - power management on SATA prevents hotplug|[![Reply with quote](https://forums.gentoo.org/templates/gentoo/images/lang_english/icon_quote.gif "Reply with quote")](https://forums.gentoo.org/posting.php?mode=quote&p=8499974&sid=410650c5d67a8cc496d46b6232a791b0)|
| --- | --- |
|---|
|I found the reason: SATA power management was active due to powertop settings which prevents hotplug to work for eSata or i guess sata in general.

Tested now with disabling all sata related toggles in powertop and once with boot without powertop settings to be called - in both cases all drives/bays where recogniced immediately.

I'm not sure which exact toggle is causing the problem (pm for controller or link power management or sth else) - will need some time to check that.

Thanks again to everyone for their ideas and suggestions. It really helped me going with the investigations.|

According to my dnf powertop is not installed, so this is definitely not related.

So here we are. More than a month passed and no solution for the problem found.
This obviously proves that this “community support” doesn’t offset the lack of normal support in any way. And this won’t do.
What do we do about this? I suggest that Red Hat creates a paid support channel so that users could get quality answers to such questions in reasonable time. Is anyone from Red Hat here? Can you answer on this suggestion?

I am sorry that you feel we owe you support as would be expected from a paid support group. You obviously are asking for something that no others reading this know an answer to or have encountered and may thus get no additional support.

Your negative comment here (my emphasis in the above quote) does not endear you to those volunteers who might otherwise be willing to try and assist. Demanding an answer seldom is seen as acceptable to volunteers.

3 Likes

So, there is already a paid-support based distribution that Red Hat provides, Red Hat Enterprise Linux:

It comes with paid technical support. So I think that’s your best bet.

Fedora will remain a community based distro for the foreseeable future. If someone knows the answer and can help, they certainly will. Your issue here seems to fall into the realm of “very specific, very technical, probably needs someone to write a new tool or more code”. Folks have answered and helped and that serves as the limit of the community knowledge here in this moment. Sure, there must be others more knowledgeable in the community, but they have not participated in the discussion here for one reason or another.

If your expectation is that someone will drop everything they are doing to debug your issue and fix it, I’m afraid a volunteer based distribution is not the right choice for you. Please buy a distribution with paid support. The forum is for all us community members, more friends, to discuss issues and help each other.

In general, I note that it is not a support channel in the same way as a company/corporation you pay for products/services provides you with support since we are not providing products/services in exchange for money.


@federal In spite of how irritated/upset you are about the perceived lack of support here, I will remind you to please read the code of conduct and be excellent to others. We do not tolerate bad behaviour on any community channels. Please step away from the keyboard if you think you are too upset to write a polite remark.

3 Likes

Search also works very well on a browser.I just did a search
External eSATA hard drive not recognized Fedora and came up with about 172,000 results so as with any issue searching will usually find an answer.