3

Has anyone managed to format an actual real disk with the new apple filesystem APFS in Mac OS Sierra ?

the documentation explains how to make a disk image with APFS:

hdiutil create -fs APFS -size 1GB foo.sparseimage

However, when trying to restore this image to a real disk with either 'Disk Utility' (GUI) or 'asr' (CLI), I get a "is not valid for restoring" error.

I've created several different disk images in different formats (-format flag to hdiutil) in the hopes of creating a disk image that could be used for restoring to a real disk, but the error always stayed the same.

Did anyone managed to get APFS on a real disk?

clhy
  • 6,514

1 Answers1

4

Try the following:

diskutil partitionDisk /dev/disk2 1 GPT APFS TEST R

diskutil list

should give:

/dev/disk2 (external, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:           GUID_partition_scheme                    *480.1 GB   disk2
   1:                         EFI EFI                     209.7 MB   disk2s1
   2:                      Apple_APFS                     479.9 GB   disk2s2

/dev/disk2s2s1 (external, virtual):

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                APFS Volume TEST                   +24.6 KB    disk2s2s1
JRG
  • 41