How to recover an SSD (Samsung) after deleting all the namespaces?

I deleted all the namespaces (2 were present) on a samsung drive (SSD). Now the drive is not being recognized by the system. How do I recover the SSD?


You should still be able to see nvme0 in /dev -- only the -nX entries should be gone. Try sudo nvme create-ns -s 100000 -b 4096 /dev/nvme0, then sudo nvme attach -n 1 /dev/nvme0, and see if that gets things working again.