Accidentally ran partitionDisk command on disk1 I accidentally ran a command (once) that I copied and pasted on disk1 instead of changing it to the appropriate disk and now I'm really worried I may have damaged my primary disk's (SSD) partition table. The MacBook's still running fine, but I'm afraid to reboot it.

The command was:

diskutil partitionDisk disk1 GPT ExFAT "Seagate_02" 0g


And the error was:


  You cannot manually partition an existing APFS Container disk.


Would this have actually made any changes since it errored out? What can I check?

I also still have the diskutil list results from before and after I ran the command, which look the same:

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +912.4 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            444.2 GB   disk1s1
   2:                APFS Volume Preboot                 19.7 MB    disk1s2
   3:                APFS Volume Recovery                506.6 MB   disk1s3
   4:                APFS Volume VM                      4.3 GB     disk1s4


I'm running macOS 10.13.2.
Your real (physical) disk is your SSD/disk0. Disk1 is a virtual ("synthesized") disk based on the APFS physical store disk0s2.

Disk1 doesn't have a partition scheme. Additionally it contains your boot volume disk1s1.

Therefore the command diskutil partitionDisk ... run booted from your main boot volume (Macintosh HD) shouldn't be able to completely repartition and reformat neither disk0 nor disk1.

You can verify the disk and the APFS container/volumes with:

diskutil verifyDisk disk0 # verify physical disk
diskutil verifyVolume disk0s2 # verify APFS container
diskutil verifyVolume disk1s1 # verify APFS boot volume


The second command may yield something like:

warning: Overallocation Detected on Main device: (626695+1) bitmap address (28278)


which seems to be normal.

The third command usually checks all available APFS volumes despite passing on only one slice (disk1s1).

Therefore you will/should see the output:

Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots


several times.

"The partition map appears to be OK" or "exit code is 0" indicates that everything is OK.