DiskManagement.disenter error 49217

My 2TB external hard drive is failing to appear after I didn't eject it properly. I attempted to mount using Disk Utility which brought up the error 49217 which failed. Attempting to run First Aid returns the message below. Any ideas on how to recover the data?




Repairing file system.

Volume is already unmounted.

Performing fsck_apfs -y -x /dev/rdisk4s1

Checking the container superblock.

warning: container has been mounted by APFS version 2235.80.4.0.1, which is newer than 1677.141.3.7.2

warning: disabling overallocation repairs by default; use -o to override

Checking the space manager.

Checking the space manager free queue trees.

Checking the object map.

Checking volume.

Checking the APFS volume superblock.

warning: apfs superblock at index 0: apfs_fs_alloc_count (158958540) is greater than container wide allocated count (158878084)

Checking the object map.

error: (oid 0x1d4a1e) om: invalid o_oid (0x68af)

error: (oid 0x1d4a1e) om: invalid o_type (0x3, expected 0x4000000b)

error: (oid 0x1d4a1e) om: invalid o_type (0x3, expected 0x4000000b)

error: verification/reading of the omap object failed: Illegal byte sequence

The volume /dev/rdisk4s1 could not be verified completely.

File system check exit code is 8.

Restoring the original state found as unmounted.

File system verify or repair failed. : (-69845)



Operation failed…