Fixing a broken hard drive's partition map
I have a drive that is corrupted. Disk utility could not repair the disk, so I attempted to follow some tutorials and repair the partitions using pdisk and testdisk, but things have gone south. Now the drive no longer shows up at all in Disk Utility, and diskutil info gives this output:
diskutil info /dev/disk1
Device Identifier:
Device Node:
Part of Whole:
Device / Media Name:
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Partition Type: None
OS Can Be Installed: No
Media Type:
Protocol:
Total Size: 0 B (0 Bytes) (exactly 0 512-Byte-Units)
Volume Free Space: Not applicable (no file system)
Read-Only Media: Yes
Read-Only Volume: Not applicable (no file system)
Ejectable: No
Whole: No
Internal: No
This is a 3TB external Seagate drive. Is there anything I can do, or is this drive a paperweight? At this point I don't even care about the data on the drive. I just want to know if it can be reformatted and be usable, or if I need to go out and get a new drive.
Solution 1:
Have you tried asking disk utility to redo the partition map? Click on the disk, go into the "partition" tab, set it from "Current" to "1 Partition", click "Options", change the partition table to anything else, then repeat the process and set it back. If the issue is the partition table, that will fix it. If the issue is the drive, then it won't. Either way, you'll have your answer.
Solution 2:
For the reference of others: if you're absolutely sure it's the partition map that's damaged, after backing up the drive you could use fdisk in a Linux virtual machine to verify it. Something like sudo fdisk /dev/sdb
and then v verifies the partition map. You could recreate the partition map manually too with fdisk or gparted, without actually erasing anything.
William T Froggard fails to mention in his answer that repartitioning with disk utility will almost always be destructive, unless you're resizing a HFS+/APFS disk.