I am in search of a trick/program/port to make hotplugging work with SATA disks. I can't find it anywhere, it seems it is nowhere mentioned.
With SCSI things were dead simple: just hot-plug it, and it works. It doesn't matter if it is supported or not. Just make the bus idle, plug the connector (rather more than less cleanly), and run "camcontrol rescan" afterwards.
With SATA things seem similarly simple: hotplug does just not work.
The first thing we were told was that it cannot work in IDE/ATA, we would need to switch to AHCI where it would be supported. Nowadays everything uses AHCI, hotplug is supported, and does not work nevertheless
At some time there was a command
But in Rel.10
Occasionally people complain about that, like here: https://www.truenas.com/community/threads/hotswap-not-working-anymore.75960/ - but then there is only shrugging, and nobody knows a solution.
The problem is, one would need something that does the same thing that
I observed this missing hotplug capability on versions up to 12.3, and I observed it on different consumer boards, so I thought the operation is just no supported on these. But now I found that on a haswell xeon server board the behaviour is exactly the same: SATA hotplug is not possible; after a device is unplugged, no other device is recognized on that mainboard connector (plugging it into a different connector might work if there is an unused one).
At that point one would need to run the functionality as on initial boot - but there seems to be no tool known that would do that.
With SCSI things were dead simple: just hot-plug it, and it works. It doesn't matter if it is supported or not. Just make the bus idle, plug the connector (rather more than less cleanly), and run "camcontrol rescan" afterwards.
With SATA things seem similarly simple: hotplug does just not work.
The first thing we were told was that it cannot work in IDE/ATA, we would need to switch to AHCI where it would be supported. Nowadays everything uses AHCI, hotplug is supported, and does not work nevertheless
At some time there was a command
atacontrol
, that very much looked like it would make things work. It had the necessary cmdline options, at least. (I never dared to try it out.)But in Rel.10
atacontrol
was removed, and we were told that we should use camcontrol
instead. So hotplugging was no longer supported for (S)ATA, only hot*un*plugging was now possible: one can unplug a device from the running system, plug in a new device that will nicely connect and spin up, and will then become visible to the OS after the next reboot.Occasionally people complain about that, like here: https://www.truenas.com/community/threads/hotswap-not-working-anymore.75960/ - but then there is only shrugging, and nobody knows a solution.
The problem is, one would need something that does the same thing that
camcontrol rescan
does for SCSI devices: make the adapter/bus find and recognize new devices. This is what atacontrol
apparently did. camcontrol
cannot do it for SATA devices, because it needs a bus to scan, and with IDE/ATA/SATA the bus is contained in the device.I observed this missing hotplug capability on versions up to 12.3, and I observed it on different consumer boards, so I thought the operation is just no supported on these. But now I found that on a haswell xeon server board the behaviour is exactly the same: SATA hotplug is not possible; after a device is unplugged, no other device is recognized on that mainboard connector (plugging it into a different connector might work if there is an unused one).
At that point one would need to run the functionality as on initial boot - but there seems to be no tool known that would do that.