Please note, that this is input/reflection from a person with absolutely no programming experience:
As I understand it, computers are not very fond of removing or plugging in SATA-devices on the go. You usually have to reboot the PC whenever you change something with SATA-interface. However, there are also fully hot-swappable drive bays, so my quess is that those have some chip that makes the SATA interface think there is always something connected, and that the drive essentially works as an external drive. I would thus imagine, you could construct some kind of interface with a dual-chip design making two computers think you have a SATA plugged into both, and then make a switch that targets which PC the data stream from the drive should go to.
Question is, why would you ever need this, instead of using e.g. ethernet connections between the computers, which
@Valantar and
@chx suggest?
But I digress, these were just reflections from a non-engineer point of view.