I got a new Western Digital 4TB MyBook a year ago that I was using as a Time Machine drive for my laptop. Just today, it suddenly failed to mount. I ran Disk Utility/First Aid on the drive which reported no errors, and didn't do anything to fix it.
I read there were issues with WD enclosures, so I popped the bare drive out and stuck it into a 3rd party SATA to USB3 enclosure. Same problem, the disk is seen but can't be mounted.
I figured I'd just use Erase to reformat it as plain APFS and start fresh, but diskutil gets all the way through to "Creating new APFS Volume", then fails when trying to mount it.
Erasing “WDC WD40 EDAZ-11SLVB0 Media” (disk2) and creating “Untitled”
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as Mac OS Extended (Journaled) with name Untitled
Initialized /dev/rdisk2s2 as a 4 TB case-insensitive HFS Plus volume with a 311296k journal
Creating a new empty APFS Container
Switching disk2s2 to APFS
Creating APFS Container
Created new APFS Container disk6
Preparing to add APFS Volume to APFS Container disk6
Creating APFS Volume
Created new APFS Volume disk6s1
Mounting APFS Volume
Couldn’t mount disk. : (-69842)
If I format the whole disk as Mac OS Extended (Journaled), it works fine and successfully mounts the disk. I've tried partitioning it, and even using dd to overwrite the beginning of the raw disk with random data, but after any of that the behavior is the same. If I put an APFS filesystem on the drive it won't mount, any other kind of filesystem will mount.
What might cause this?