External USB 3.0 Hard Drive unallocated space randomly in windows 10

Hi, i have a external hard drive that i normaly backup things to, its stored in a case and only pluged in when i need it.
I have dual boot, a windows 10 and a linux disto on my main drive, last time i used the external drive it was in the linux environment, today when i connected to windows 10, nothing showed up, so i thought it didnt have a drive letter, so i went to the disk management and i got a prompt to choose the table partiton, i instinctively selected GPT and clicked ok, and then i noticed the drive had no partition and unallocated space.

My best guest i forgot to unmount when i was in the linux environment and corrupted the partition table, or it was something with windows because on the event log i get this,

Device SCSI\Disk&Ven_Freecom&Prod_Mobile_Drive_XXS\7&546925e&0&000000 was not migrated due to partial or ambiguous match.

Last Device Instance Id: SCSI\Disk&Ven_Corsair&Prod_Force_LS_SSD\4&1038a42f&0&000000
Class Guid: {4d36e967-e325-11ce-bfc1-08002be10318}
Location Path:
Migration Rank: 0xF000FC000000F020
Present: false
Status: 0xC0000719

Is there any way i can restore the partition table, or something else to restore access to the data? Because so far i understand, i didnt format the drive or did something else to it, so the data should be there… i remember that exists a tool to repair this kinde of problems.

Already tried diferent USB ports, connecting to a diferent machine, connecting to the linux install.

Thank for the attention.

Output from diskpart using this command: list disk

Drive giving problems is Disk 2, there is an option in disk management to convert to dynamic disk, and searching about it online, that method doesnt erase the drive, but converting back to basic will

Disk Status Size Free Dyn Gpt
 Disk 0  Online  111 GB 0 B    *
 Disk 1 Online 465 GB 501 MB *  
 Disk 2 Online 931 GB 931 GB   *

S.M.A.R.T dump from CrystalDiskInfo

(03) ST1000LM025 HN-M101ABB

    Model : ST1000LM025 HN-M101ABB
    Firmware : 2BA30002
    Serial Number : G3913G941AW027
    Disk Size : 1000,2 GB (8,4/137,4/1000,2/1000,2)
    Buffer Size : 8192 KB
    Queue Depth : 32
    # of Sectors : 1953525168
    Rotation Rate : 5400 RPM
    Interface : UASP (Serial ATA)
    Major Version : ATA8-ACS
    Minor Version : ATA8-ACS version 6
    Transfer Mode : SATA/300 | SATA/300
    Power On Hours : 219 hours
    Power On Count : 489 count
    Temperature : 26 C (78 F)
    Health Status : Good
    Features : S.M.A.R.T., APM, AAM, NCQ, GPL
    APM Level : 0080h [OFF]
    AAM Level : FE00h [OFF]
    Drive Letter :

I assume the drive is in NTFS format? I am not much of a Windows guy so I have no idea how the Windows tools are working in this situation, but I can try to help via Linux.

  1. Do you have a second empty drive you can copy the data to before attempting anything? If so, you can use dd to copy exactly what is on the drive now to a secondary just in case something goes sideways during the recovery process.

  2. Does a partition show up on the drive using lsblk in Linux? It would probably be something like “/dev/sdb1”, with “/dev/sdb” being the device and “/dev/sdb1” referring to the partition on that device. If so, then use mount to mount it at the path it is normally mounted. The command would follow the syntax for example “mount /dev/sdb1 /mnt/usual_location”, replace with your specific partition path and path where the drive is typically mounted.

Hi, thanks for the reply!

I installed TestDisk and performend a scan, it found my partition and the files were all there, wrote to the disk and now everything is ok.

For any future references, dont write anything to the disk and run TestDisk, its a very good piece of software.