(solved) How do I enable SATA hotplug?

I have a passive front panel drive dock that interfaces through the motherboard SATA ports. Machine supports SATA hot plug and it is enabled in EFI setup. Hardware works fine on that “other operating system.”

So far, the only way I can get Manjaro to “see” the drive is to manually rescan the scsi ports. Once the drive is detected it can be manually mounted and thence works as it should.
I suppose I could do a simple script to handle all this, but I thought Linux supported SATA hotplug.

Running Manjaro Testing with 5.8 kernel, AMD x570/3700x, Nvidia 2080RTX. Any suggestions appreciated.

Take a look at what your system is doing when you plug the drive in:

sudo dmesg -w

Then plug the drive in.

With the gnome-disk-utility you can set the HDD in stand by mode and when it stops spining it can be safely replaced with a different HDD. maybe that will help …

The specific answer to your post is that absolutely nothing happens.

And, that’s helpful because it means I’ve probably got a udev or maybe systemd issue – thanks for the steer.

Well, the issue is the drive isn’t detected automagically. Funny though, once unmounted it will get disconnected from the bus automatically. Likely something amiss in the udev configuration.

I’m not very well versed on udev, so all I can do is ask:

Did you make a manual rule that might be borking the autodetect?

No, but I think I need to make one that enables autodetect for scsi/SATA devices. Anyway, that’s what I’m researching now.

Systemd might also have that ability. In fact, I should probably start there.

I wanted to follow up and report how I resolved this issue:

  1. Install two packages:
    sg3_utils (Manjaro repository)
    scsiadd (AUR)

  2. Find the hot plug device (make sure it’s in the dock and powered) with the command:

     	sudo echo 0 0 0 | tee /sys/class/scsi_host/host*/scan

Output will look like:

	   [3:0:0:0]    disk    ATA      Samsung SSD 840  DB6Q  /dev/sdc 
  1. Using the device identification parameters from the scsi-scan output (host:channel:ID:lun) (numerals only). Example:

     	scsiadd -a 3 00 00 00

which should detect the device and cause udisk to mount it at /run/media/username/disklabel

To remove the device, first unmount it from the file system with the umount command, then run scsiadd with the -r option (ex:scsiadd -r 3 00 00 00) to uncouple the device from the SCSI bus.