5 Replies
      Latest reply on Jul 5, 2016 11:37 AM by mdobro
      Strontium90 Level 1 Level 1 (20 points)

        Having no problem with creating disk images in APFS format.  However, I am trying to format an external disk (SSD over USB) as APFS.  However, each attempt results in:

         

        Mounting APFS Volume

        Error: -69842: Couldn't mount disk

         

        The container is created, but the volume is not.  I've tried the create verb as well as the createContainer and createVolume combo.  In both cases, the container appears to be properly created but the volume is not.

         

        Once the action fails, I can disconnect the drive from the machine.  When I reconnect, the volume mounts as read only and a dialog box appears stating "OS X can't repar the disk "diskName"  You can still open or copy files ...."

         

        Likewise, trying to create a volume with a size smaller than the entire drive also fails with -69842

         

        diskutil apfs createVolume disk1s2 APFS MyFunDisk 400g

         

        Here is diskutil list after creation and the error:

         

        /dev/disk1 (external, physical):

           #:                       TYPE NAME                    SIZE       IDENTIFIER

           0:      GUID_partition_scheme                        *512.1 GB   disk1

           1:                        EFI EFI                     209.7 MB   disk1s1

           2:                 Apple_APFS                         511.8 GB   disk1s2

        /dev/disk1s2s1 (external, virtual):

           #:                       TYPE NAME                    SIZE       IDENTIFIER

         

        And here it is after a disconnect and reconnent of the drive.

         

        /dev/disk1 (external, physical):

           #:                       TYPE NAME                    SIZE       IDENTIFIER

           0:      GUID_partition_scheme                        *512.1 GB   disk1

           1:                        EFI EFI                     209.7 MB   disk1s1

           2:                 Apple_APFS                         511.8 GB   disk1s2

        /dev/disk1s2s1 (external, virtual):

           #:                       TYPE NAME                    SIZE       IDENTIFIER

           0:                APFS Volume MyFunDisk              +400.0 GB   disk1s2s1

         

        The mount command shows it as read only:

         

        /dev/disk1s2s1 on /Volumes/MyFunDisk (apfs, local, nodev, nosuid, read-only, journaled, noowners)

         

        I am guessing it is just too early, but I want to see if anyone else has had success creating an APFS formated full disk

        • Re: Anyone able to create full disk APFS volume
          mdobro Level 2 Level 2 (40 points)

          I see the same error with an external firewire drive. The fsck_apfs command reported that there were errors with the volume hence its being mounted read-only. I was able to work around it by adding a second volume which was created without any errors. I then deleted the two volumes and added a single volume back. This is definately beta quality code.

           

          Has anyone been able to create an encrypted volume? I get a different error when I try to use any of the encryption or effaceable options to addVolume.

            • Re: Anyone able to create full disk APFS volume
              Ross Kinard Level 2 Level 2 (55 points)

              One of the other threads, Tuesday File Systems Lab Notes, covers a lot of questions about encryption in APFS and it really looks like they haven't implemented it yet since they haven't finalized the tools that will manage it.

              • Re: Anyone able to create full disk APFS volume
                Strontium90 Level 1 Level 1 (20 points)

                Nice call.  Thanks for the tip.  As detailed, creating two, then deleting two, then creating one of the entire drive did the trick.

                 

                For others, assuming the drive is the 2nd disk, here are the commands:

                 

                diskutil apfs createContainer disk2s2

                 

                diskutil apfs addVolume disk2s2 APFS small 10g

                 

                ## This operation created the volume but fails to mount with the -69842 error

                 

                diskutil apfs addVolume disk2s2 APFS big 450g

                 

                ## This operations created the volume and mounts it

                 

                diskutil apfs deleteVolume disk2s2s1

                diskutil apfs deleteVolume disk2s2s2

                 

                ## this removes the volumes but leaves the container

                 

                diskutil apfs addVolume disk2s2 APFS BigDrive

                 

                Time to play!

                • Re: Anyone able to create full disk APFS volume
                  grahamperrin Level 1 Level 1 (20 points)

                  USB flash drive with HFS Plus: I had no problem using the same drive for APFS.

                • Re: Anyone able to create full disk APFS volume
                  mdobro Level 2 Level 2 (40 points)

                  I just tested this on Developer Beta 2 and it looks like the isue has been fixed.