I have an SSD that stopped working on my PC 3 weeks ago, and have become confused after various attempts at troubleshooting.
I have two M.2 SSD slots with a drive in each, and when I swapped them around the faulty drive would not show up but my functional drive would still work fine. In both configurations the drive is not visible in windows via Disk Management or the Device Manager. Having just the faulty drive plugged into my PC simply lead to it booting into BIOS, where it was still undetected. I have attempted both SATA configuration settings from the BIOS, neither of which yield results. There is no visible damage to the drive or my M.2 SSD ports.
However, despite all this, the drive still functions when plugged into my friend's computer.
Would it be possible that the drive or my motherboard somehow received a driver update that made them incompatible? All of my drivers are currently considered up-to date by windows (afaik). I'm not sure what to do given that the drive works on another computer but not my own, but I don't want to risk losing my data.
It is a Western Digital SN580 2TB Solid State Drive, model WDS200T3B0E.
My motherboard is a B450 Steel Legend, and the BIOS Version/Date is listed as "P3.40, 2020-06-04"
Any help would be appreciated, and thank you for your time
On the computer that still recognizes it, get all of your data off of it NOW. Now is one of those times where you need to do a full and complete backup before proceeding.
Drivers are not going to affect something in this manner.
You have a failing drive, and something in your friends computer (a stronger 3v3 Line, etc) is causing it to be able to attach. Do not trust this drive for anything important any longer. Get everything off of it immediately.
In fact, prioritize your data extraction. Start with the most important things to you; because the drive could die at any moment. It could also die 2 years from now. But this is almost surely signs of a hardware failure, and you need to warranty it as soon as you get your data off.
Whenever something funky is happening to a drive, back up all the important data on it immediately. Better safe than sorry, and the first fix I'd try is to essentially factory reset the disk, since you seem to have already tried the other fixes.
Try a USB to M.2 adapter. These aren't particularly fast but see if your computer can detect it when it is connected through the adapter. It should show up like a USB drive if successful.
Open Windows Powershell as an administrator to open a command terminal.
Run Get-Disk in the terminal. Find the disk in question among the list and note what number it is.
Run Clear-Disk -Number 999 -RemoveData -RemoveOEM, except with the target disk's actual disk number instead of 999. This will erase all data on the disk. You won't be prompted for confirmation. Ensure you give it the right disk number. This might take a while to complete. You'll know it is complete when the PS> prompt appears again. If nothing happens right after you press enter or the terminal seems to freeze, just wait. It is running.
After the drive is cleaned, try putting it back into the M.2 slots on your motherboard as usual and see if it is detected. If so, initialise the drive as usual (GPT is suggested if you are given a choice between GPT and MBR) and format it.