I accidentally reformatted /dev/disk2 (when I wanted to do it for /dev/disk5...)

Users-MacBook-Pro-3:~ user$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         500.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume APPLE SSD AP0512M Media 381.2 GB   disk1s1
   2:                APFS Volume PreBoot                 18.4 MB    disk1s2
   3:                APFS Volume Recovery                521.4 MB   disk1s3
   4:                APFS Volume VM                      4.3 GB     disk1s4
   5:                APFS Volume Programming             74.0 GB    disk1s5
   6:                APFS Volume P2                      33.4 GB    disk1s6

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *6.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS B14P1                   499.9 GB   disk2s2
   3:                  Apple_HFS B14P2                   499.9 GB   disk2s3
   4:                  Apple_HFS B14P3                   499.9 GB   disk2s4
   5:                  Apple_HFS B14P4                   499.9 GB   disk2s5
   6:                  Apple_HFS B14P5                   499.9 GB   disk2s6
   7:                  Apple_HFS B14P6                   499.9 GB   disk2s7
   8:                  Apple_HFS B14P7                   499.9 GB   disk2s8
   9:                  Apple_HFS B14P8                   499.9 GB   disk2s9
  10:                  Apple_HFS B14P9                   499.9 GB   disk2s10
  11:                  Apple_HFS B14P10                  499.9 GB   disk2s11
  12:                  Apple_HFS B14P11                  499.9 GB   disk2s12
  13:                  Apple_HFS B14P12                  500.8 GB   disk2s13

/dev/disk5 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *6.0 TB     disk5
   1:       Microsoft Basic Data Elements                6.0 TB     disk5s1

Users-MacBook-Pro-3:~ user$ diskutil partitionDisk /dev/disk2 GPT JHFSX FTP9 6T
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as Mac OS Extended (Case-sensitive, Journaled) with name FTP9
Initialized /dev/rdisk2s2 as a 5 TB case-sensitive HFS Plus volume with a 458752k journal
Mounting disk
Finished partitioning on disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *6.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS FTP9                    6.0 TB     disk2s2

Is there anything i can do to undo this? I have lots of precious data in there ;(;(

I have not done anything else on the disk / partition so far. I have Disk Drill, but instead of scanning, is there any way to easily recover the original partitions and data back?

This is similar case to Recover partitions after ‘diskutil partitionDisk’ command, but in that post, there was not really an answer, and the commands I have used are slightly different.

I am using mac10.13.6 on A1990 macbook.


1 Answer 1


There is no undo in this case. Do you know exactly what the partition layout was before the command was issued?

Assuming no data was written other than to the partition table headers, it might be worth attempting to rewrite the old values if you don’t want to seek professional data recovery or attempt recovery yourself.

None of these options is foolproof, and if you write more data to the drive, you could reduce the chances another avenue will succeed. For sure don’t write any new data to that drive in case recovery turns out to be your best option.

  • how do I / could I have known this, @bmike: "what the partition layout was before the command"? Fyi I am not super familiar with data recovery related concepts, pls pardon my lack of knowledge Sep 14, 2022 at 12:31
  • the rewrite old values seem like smth to explore @bmike, but I am not completely familiar with this whole field of data recovery, or data at the hard disk / disk sector level, so I really hope to know more.. if you can, do point me to some intro readings or resources Sep 14, 2022 at 12:34
  • yes I did not write anything else to the drive, @bmike Sep 14, 2022 at 12:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .