dimanche 8 février 2015

Fixing my external hard drive's partition map


Okay, so something really strange has happened, and it's a doozy, so please bear with me.




Problem: I need to fix my hard drive's partition map




So let me fill you in on what happened here.


I have an external 3TB hard drive that I use for storage with my Mac Pro. It recently had 4 partitions on it. This is what the map looked like.



  1. Backup [OS X, Journaled]: 1.4TB

  2. Macintosh HD clone [OS X, Journaled]: 0.3 TB

  3. Yosemite [OS X, Journaled]: 0.5 TB

  4. Windows Bridge [FAT]: 0.5 TB




I had originally downloaded and installed Yosemite on a separate partition to play around with it, and then when I decided I liked it, I copied my Mavericks Mac HD onto another partition of the drive as a backup. I then upgraded my main system to Yosemite.


Later on, I decided that I no longer needed the Mac HD clone, since Yosemite is pretty stable at this point, so I removed it; I also resized the Yosemite partition down to 300 GB since I wasn't going to write anything else to it.


The partition map then looked like this:



  1. Backup: 1.4TB

  2. Unallocated: 0.3TB

  3. Yosemite: 0.3TB

  4. Unallocated: 0.2TB

  5. Windows Bridge: 0.5TB




That was all fine. However, recently, I installed Windows through Bootcamp on my primary SSD. In Windows' disk management, I tried to remove the Windows Bridge partition and replace it with a 0.7TB NTFS partition. The partition deleted, but the reformat operation failed, so I figured I would boot into OS X, remove the partition, and add a new FAT 0.7 TB partition which could then be reformatted by Windows into NTFS.


I opened up Disk Utility and saw that the Windows Bridge partition was still there according to OS X. So I went ahead and removed it.




And then, bad stuff happened.


The windows partition removed successfully, but the Yosemite partition immediately became unrecognizable by OS X. The files are intact, but OS X sees it as disk1s3, and is unable to read, write, or repair the disk.


The strangest part of it all is that Windows can still read the drive. If I boot into Windows, I can copy anything from the partition, and it works just fine, but boot back into OS X, and the partition is unreadable.




Things I've tried


1. TestDisk and PDisk


I have tried to create my own partition map for the drive using TestDisk to find the partitions and PDisks to create the new partition. TestDisk shows some weird configurations. It appears as though there are two partitions, masquerading as MS Data, assigned to the same set of blocks, with the name Yosemite. That must be causing the problem:


enter image description here


PDisk will not let me open the disk to be rewritten.



pdisk: can't open file '/dev/rdisk1' for writing (Resource busy)



2. Copying all of the files and re-formatting.


Since Windows can read the disk, I figured, why not copy everything from the Yosemite partition onto the Windows ST partition and reformat the broken partition. The only problem with that is that Windows limits path names to 255 bytes, and in OS X, a lot of the files have filenames that are much longer than that. I need all of the files on the drive in order to keep it bootable, so skipping those files that would not copy is out of the question.




So:


Do any of you fine people have any ideas as to how I can fix this partition map and/or get all of my data off of that partition so I can reformat it?


I can definitely go pick up another 3 TB drive to use to copy all of the files off of the existing drive so that the drive can be completely reformatted if you know of a way that I can get all of the files off of the Yosemite partition.





Aucun commentaire:

Enregistrer un commentaire