hard drive – Undo a diskutil partitioning attempt?

Spread the love


Advertisement

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

Advertisements

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.

Author: Subham

Leave a Reply

Your email address will not be published. Required fields are marked *