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.

  • This is really helpful. The first and third command came back with "The ... appears to be OK", except for the container one–this one just said "Storage system check exit code is 0". I also ran it on another Mac with 10.13.2 and it did say "The volume /dev/disk0s2 appears to be OK". What could this mean? Here is the full output: justpaste.it/1fklu. – Mario Parra Jan 11 '18 at 15:22
  • Since you mentioned that disk1 is my virtual disk, I looked at the diskutil list results for disk0 and they're also the same (before and after), noting "2: Apple_APFS Container disk1 912.4 GB disk0s2". – Mario Parra Jan 11 '18 at 15:27
  • The first three blocks in the note are from the Mac in question and the last block from the second. I ran diskutil verifyVolume disk0s2 again (without the comment) on the original Mac and got "The volume /dev/disk0s2 appears to be OK" this time (updated the note). Everything looks good, then? Thanks again! – Mario Parra Jan 11 '18 at 15:46
  • @MarioParra It was my fault: I misinterpreted my own output ;-) – klanomath Jan 11 '18 at 15:50
  • Haha everything seems healthy, then? I'm still scared to reboot not knowing exactly what I may have changed. – Mario Parra Jan 11 '18 at 15:55

You must log in to answer this question.

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