There are many reasons why the Mac mini hard drive is disconnected. If it is because there is a problem with the external hard drive itself, such as a bad spot on the hard drive, or the hard drive is directly unplugged and cannot be mounted, etc., then you should deal with it as you should. My method may only be effective for normal hard drives and operations.
There are four other troubleshooting tutorials at the end of the article.
Since the memory and hard disk of Mac computers are made of "gold", in order to ensure the user experience, we often choose to upgrade the memory and use an external hard disk to expand the storage space under limited budget. However, the disconnection of the external hard disk regardless of time and place has become an unforgettable nightmare.
One second the external hard drive was working, the next it was “lost”.

I didn't really care about it at first, because I could just plug and unplug the data cable and it would be back to normal. I use NAS to store data most of the time. But when I was making the video of using iPad as Mac mini screen, the recorded video exceeded 100G, so I found a 256G sata3 SSD as a transfer disk.
The situation at that time was:
- SSD format APFS
- Connect the data cable to the USB-C port on the front of the Mac mini M4
Then, something outrageous happened. The hard drive disconnected, and it even disconnected when transferring files. It was unreasonable. I originally thought that it was because the "hard drive enters sleep state for a long time" was set, but I turned off the relevant setting in "Settings-Energy", and the hard drive still disconnected.
The most outrageous time was that I had just plugged the hard drive back in and it lost connection again within less than a minute.
So, I started looking for tutorials to see how to solve it.
1. Failure to mount due to incorrect plugging and unplugging
This situation is actually not related to my situation, but I do have the habit of plugging and unplugging hard drives directly. So I checked:
Code:ps aux | grep fsck
Code:diskutil list
Everything is normal.
Then, I looked at the process again, and there was no:kernel_task
Finally, I performed “first aid” on the SSD in the hard disk tool, but the disconnection problem still existed.
These three are all abnormal operations on the hard disk or system, but my hard disk and system are normal, so they are useless.
2. Insufficient power supply?

This picture is a reproduction of the problem. At first, I was more inclined to think it was a power supply problem. Because the USB power supply of Mac mini has always been complained. And the problem with my M4 Mac mini is the sata3 SSD with USB-C in the front, but the PCIe4 SSD with Thunderbolt port in the back is fine.
So, I started to investigate:
(1) Replace the Thunderbolt and USB-C interfaces, failed
I connected this hard drive to the thunderbolt port on the back of the Mac mini, and it still disconnected. So, it has nothing to do with the port.
(2) Replace the data cable, failed
I suspect it's a data cable issue. But this SSD enclosure uses a Micro-USB 3.0 port, and both ends of my USB4.0 cable are Type-C, so there's no way to change the cable.
(3) Docking station power supply fails
Since I suspected that it was caused by insufficient power supply, I plugged an expansion dock into the Mac mini, powered the dock with a data cable, and then plugged in the SSD, but it still failed.
(4) Change the hard disk format successfully
After countless reconnections, I finally transferred more than 100G of video material to another hard drive. I changed the hard drive format from APFS back to NTFS. My original idea was: In Windows computers, there has never been a hard drive disconnection situation. If I change the hard drive back to NTFS, at least the computer can still be used normally.
However, I later discovered that after this NTFS SSD was connected to the Mac mini, there was no disconnection problem for two consecutive days. This was a blessing in disguise.
It should be noted that during this period, the hard drive hibernation setting of my Mac mini has been turned on.

Well, if your Mac also encounters the problem of external hard drive disconnection, after failing to find the problem, you might as well try changing the hard drive format, which may have a miraculous effect.
- Attached is another solution to the problem of four hard disks being disconnected
- 1. Insufficient USB power supply
- https://blog.csdn.net/bornhovering/article/details/72779012
- 2. Prevent hard disk hibernation through software
- https://www.macx.net/th-2239217-1-1.html
- 3. Unable to identify after wrong plugging and unplugging
- https://sspai.com/post/59017
- 4. Automatic disconnection at irregular intervals
- https://juejin.cn/post/7134893044503543821
- If you find it useful, please follow it.