So I found this IcyDock ToughArmor MB601VK-B 2.5" NVMe U.2 SSD Mobile Rack For External 3.5" Drive Bay. It’s supposed to allow U.2 NVMe disks to be hot swappable. And looks like U.2 has hot swap as part of the specification. I’ve been trying to get it to work on an ASUS WS-X299-SAGE-10G motherboard with i9-9980 XE running Ubuntu 16.04 with kernel version 4.15.0-54-generic but has no luck yet.
Right now, when the disk is poped out, it’s still in the PCIe device list. I can manually remove the disk by issuing echo 1 > /sys/bus/pci/devices/xxxx:xx:xx.x/remove
to remove it. When I plug the disk in, it doesn’t show up, and I have to issue echo "1" > /sys/bus/pci/rescan
to bring it back up. Anyone with some experience? Thanks!