MacOS Catalina – can’t mount external hdd – verification/reading of the omap object failed: Illegal byte sequence

catalinahddmountpartition

I have an external hard drive with 3 partitions, and one has given up the ghost. I can mount the other two fine but the third, my backup of data, can't be mounted. I dug around a bit and here's what I tried. /dev/disk5s3 / /dev/disk6 is the culprit.

I tried verifying…

diskutil verifyVolume disk6s1
Started file system verification on disk6s1 Store
Verifying file system
Volume is already unmounted
Performing fsck_apfs -n -x /dev/rdisk6s1
File system check exit code is 78
Restoring the original state found as unmounted
Error: -69845: File system verify or repair failed
Underlying error: 78

But that didn't work.

Here's a diskutil list

/dev/disk5 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk5
   1:                        EFI EFI                     209.7 MB   disk5s1
   2:       Microsoft Basic Data Boot                    100.0 GB   disk5s2
   3:                 Apple_APFS Container disk6         2.9 TB     disk5s3
   4:          Apple_CoreStorage Time Machine            999.9 GB   disk5s4
   5:                 Apple_Boot Boot OS X               134.2 MB   disk5s5

/dev/disk6 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +2.9 TB     disk6
                                 Physical Store disk5s3
   1:                APFS Volume Store                   1.7 TB     disk6s1

A verify volume of disk5 brings up this

√ /Volumes % diskutil verifyVolume /dev/disk5s3
Started file system verification on disk5s3
Verifying storage system
Performing fsck_apfs -n -x /dev/disk5s3
Checking the container superblock
Checking the space manager
Checking the space manager free queue trees
Checking the object map
error: (oid 0x3038dc) om: invalid o_type (0x40000003, expected 0x4000000b)
error: verification/reading of the omap object failed: Illegal byte sequence

The error seems kinda odd. I did migrate from Mojave to Catalina a few days ago and not sure it worked once afterward.

When analyzing the partition table of disk5 we get the following

/Volumes % sudo gpt -r show disk5

Password:
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640   195312496      2  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
   195722136      262144         
   195984280  5664860592      3  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
  5860844872  1952862864      4  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  7813707736      262144      5  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  7813969880           7         
  7813969887          32         Sec GPT table
  7813969919           1         Sec GPT header

As we see it's index 3. The other ones mount perfectly.

Found bit of information from user Klanomath https://apple.stackexchange.com/users/93229/klanomath

but it doesn't really help me because I'm not sure what to do. I don't want to lose all the other partitions …

√ /Volumes % sudo dd if=/dev/disk5 bs=512 skip=195984280 count=1 | hexdump
1+0 records in
1+0 records out
0000000 a8 87 a3 75 03 ea 8e e1 01 00 00 00 00 00 00 00
512 bytes transferred in 0.072951 secs (7018 bytes/sec)
0000010 ad b6 02 00 00 00 00 00 01 00 00 80 00 00 00 00
0000020 4e 58 53 42 00 10 00 00 36 dd 34 2a 00 00 00 00
0000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000040 02 00 00 00 00 00 00 00 95 e8 ff 32 dd 02 40 03
0000050 a3 67 58 81 70 d6 9e 23 b0 97 00 00 00 00 00 00
0000060 ae b6 02 00 00 00 00 00 1c 01 00 00 f4 6c 00 00
0000070 01 00 00 00 00 00 00 00 1d 01 00 00 00 00 00 00
0000080 6a 00 00 00 4c 44 00 00 68 00 00 00 02 00 00 00
0000090 45 44 00 00 07 00 00 00 00 04 00 00 00 00 00 00
00000a0 dd 37 30 00 00 00 00 00 01 04 00 00 00 00 00 00
00000b0 00 00 00 00 64 00 00 00 02 04 00 00 00 00 00 00
00000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

This is, of course, an interesting tidbit.

0x40000003, expected 0x4000000b

Can someone explain how to get this partition mounted up so I don't lose the data?

Best Answer

I had the same problem (invalid o_type (0x40000003, expected 0x4000000b)) after an upgrade of an OS to 10.15.3 and I was able to fix it in a very bizarre and unexpected manner. I added another APFS volume to the container that had a volume that was having problems. After that I was able to mount the old container with no problem. It seems now I have two disks sharing the same container and the same space, but at least the error is gone.

Add APFS Volume