APFS encrypted volume no longer accepts password

apfsdisk-utilityfilevaulthigh sierrassd

My MacBook Air (early 2015) has shown strange behavior over the last couple of weeks with crashes while the lid was closed or booting into Bootcamp partition although the MacOS partition has been set as boot partition.
Two days ago, it crashed while the lid was closed and the MacBook did not start any more – no matter how long I pressed the power button or tried a SMC reset.

The computer is now in repair, but I took out the SSD and put it into an OWC Envoy Pro external enclosure and connected it to my wife's MacBook (2012). Both are running MacOS High Sierra.
During the first couple of starts, my wife's MacBook booted fine from the SSD but froze after 10-15 minutes of work. I also noticed that sometimes when pressing the "Alt" key during startup to select the external drive, the partitions of the external SSD did not show up and I had to reconnect the OWC enclosure.

As the freezes reoccurred several times, I assumed my MacOS installation on the external SSD to be faulty which I thought would also explain the crashes during sleep mode etc. When I then booted into the 2012's regular High Sierra installation, it mounted the external Bootcamp partition fine and asked me for the password of the external MacOS partition which is APFS encrypted. However, the password was not accepted at all. There is no chance of mistyping after dozens of tries with a password that uses no caps or numbers or other signs (yes, bad, I know) and caps lock is disabled.

Both drives (the internal of the 2012 as well as the now external of the 2015 Mac) have been fully converted to encrypted APFS long before, so it should not have to do with the frequently found problem of stuck encryption of (external) drives.

After googling quit a bit, I found this website in the Apple Developer's Forum:
https://forums.developer.apple.com/thread/80174
User "croaker" suggested some commands to run from terminal which I tried, but got the following results and error messages which did not lead to a success:


Ingrids-Air:~ frederik$ diskutil apfs list
APFS Containers (2 found)
|
+-- Container disk1 8549518B-CAFB-4337-A812-99C04C5472B3
|   ====================================================
|   APFS Container Reference:     disk1
|   Capacity Ceiling (Size):      204847689728 B (204.8 GB)
|   Capacity In Use By Volumes:   182864048128 B (182.9 GB) (89.3% used)
|   Capacity Available:           21983641600 B (22.0 GB) (10.7% free)
|   |
|   +- Volume disk1s1 4E1DAA7F-B705-3D9A-A6F1-C1CFF61E8532
|   |   ---------------------------------------------------
|   |   APFS Volume Disk (Role):   disk1s1 (No specific role)
|   |   Name:                      Macintosh HD (Case-insensitive)
|   |   Mount Point:               /
|   |   Capacity Consumed:         180053475328 B (180.1 GB)
|   |   FileVault:                 Yes (Unlocked)
|   |
|   +-> Volume disk1s2 1DEEF49A-BCE1-4960-83CD-EBC28C6B6E32
|   |   ---------------------------------------------------
|   |   APFS Volume Disk (Role):   disk1s2 (Preboot)
|   |   Name:                      Preboot (Case-insensitive)
|   |   Mount Point:               Not Mounted
|   |   Capacity Consumed:         19079168 B (19.1 MB)
|   |   FileVault:                 No
|   |
|   +-> Volume disk1s3 C2A91489-D85E-4E20-B940-A785601B3463
|   |   ---------------------------------------------------
|   |   APFS Volume Disk (Role):   disk1s3 (Recovery)
|   |   Name:                      Recovery (Case-insensitive)
|   |   Mount Point:               Not Mounted
|   |   Capacity Consumed:         509820928 B (509.8 MB)
|   |   FileVault:                 No
|   |
|   +-> Volume disk1s4 7399A939-855B-45A7-AFDC-9BFFD7A330E7
|       ---------------------------------------------------
|       APFS Volume Disk (Role):   disk1s4 (VM)
|       Name:                      VM (Case-insensitive)
|       Mount Point:               /private/var/vm
|       Capacity Consumed:         2147536896 B (2.1 GB)
|       FileVault:                 No
|
+-- Container disk3 9B4D713F-1351-4868-A9DC-2F5994193C6D
    ====================================================
    APFS Container Reference:     disk3
    Capacity Ceiling (Size):      467487666176 B (467.5 GB)
    Capacity In Use By Volumes:   337432899584 B (337.4 GB) (72.2% used)
    Capacity Available:           130054766592 B (130.1 GB) (27.8% free)
    |
    +- Volume disk3s1 C02A87D1-BEAE-3FAA-8C40-D5E0CF5384BF
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk3s1 (No specific role)
    |   Name:                      Macintosh HD (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         334589607936 B (334.6 GB)
    |   FileVault:                 Yes (Unlocked)
    |
    +-> Volume disk3s2 189EED74-9D4C-4D5A-A55C-59D3EFA6B233
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk3s2 (Preboot)
    |   Name:                      Preboot (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         19566592 B (19.6 MB)
    |   FileVault:                 No
    |
    +-> Volume disk3s3 CADA1307-00AC-4445-B9B7-3DE902B80A7E
    |   ---------------------------------------------------
    |   APFS Volume Disk (Role):   disk3s3 (Recovery)
    |   Name:                      Recovery (Case-insensitive)
    |   Mount Point:               Not Mounted
    |   Capacity Consumed:         517750784 B (517.8 MB)
    |   FileVault:                 No
    |
    +-> Volume disk3s4 298B4239-D36B-4BD4-AAFE-ECDB16A84197
        ---------------------------------------------------
        APFS Volume Disk (Role):   disk3s4 (VM)
        Name:                      VM (Case-insensitive)
        Mount Point:               Not Mounted
        Capacity Consumed:         2147512320 B (2.1 GB)
        FileVault:                 No
Ingrids-Air:~ frederik$ diskutil apfs unlockvolume disk2s2
disk2s2 is not an APFS Volume
Ingrids-Air:~ frederik$ diskutil apfs unlockvolume disk3s1
Passphrase:
Unlocking any cryptographic user on APFS Volume disk3s1
Error unlocking APFS Volume: The given APFS Volume is not locked (-69589)
Ingrids-Air:~ frederik$ diskutil apfs unlockvolume disk3s1
Passphrase:
Unlocking any cryptographic user on APFS Volume disk3s1
Error unlocking APFS Volume: The given APFS Volume is not locked (-69589)
Ingrids-Air:~ frederik$ diskutil apfs unlockvolume disk3s2
Passphrase:
Unlocking any cryptographic user on APFS Volume disk3s2
Error unlocking APFS Volume: The given APFS Volume is not encrypted (-69593)

When doing a diskutil apfs list before entering the password, the output says "Filevault: Yes (Locked)". After entering the password it changes to the above "Filevault: Yes (Unlocked)".
But as diskutil said the volume is not encrypted, I thought maybe the password was accepted in the end but not correctly mounted. So I tried mounting it:

Ingrids-Air:~ frederik$ sudo mkdir /Volumes/test
Password:
Ingrids-Air:~ frederik$ sudo mount_apfs disk3s1 /Volumes/test/
mount_apfs: mount: Invalid argument
Ingrids-Air:~ frederik$ sudo mount_apfs /dev/disk3s1 /Volumes/test/
mount_apfs: mount: Invalid argument
Ingrids-Air:~ frederik$ sudo mount /dev/disk3s1 /Volumes/test/
mount: You must specify a filesystem type with -t.
Ingrids-Air:~ frederik$ sudo mount -t apfs /dev/disk3s1 /Volumes/test/
mount_apfs: mount: Invalid argument

And as this did not work out, I tried fsck_apfs which also failed:

Ingrids-Air:~ frederik$ fsck_apfs -n /dev/disk3s1 
error: device /dev/rdisk3 failed to open with error: Permission denied.
Ingrids-Air:~ frederik$ sudo fsck_apfs -n /dev/disk3s1 
** Checking volume.
** Checking the container superblock.
warning: checkpointsuperblock disagree for xp 148
** Checking the EFI jumpstart record.
** Checking the space manager.
** Checking the object map.
** Checking the APFS volume superblock.
** Checking the object map.
mount_apfs: mount: Input/output error
error: mount_apfs exit status 73
** The volume /dev/disk3s1 could not be verified completely.

I'm a bit scared about the "input/output" error. So far my only hope is that something is wrong with the enclosure and that it'll work eventually when I get the repaired 2015 MacBook back again.

Any help on this would be highly appreciated!

P.S.: Yes, I do make regular backups, but as I was on an offsite field trip for the last couple of days, it would be great if I could recover my notes so that's why reformatting and restoring is not (yet) an option…

Best Answer

mount_apfs: mount: Input/output error

The enclosure, cable, or drive are (or are going) bad.