macOS external hard drive not recognized

It was working fine, still usable in the morning, but suddenly stopped being recognized in the afternoon.

This article was transcoded by SimpRead, original article at www.cnblogs.com

Sometimes I really want to delete those misleading blog posts written irresponsibly. One day, I will drive all the lousy blogs out of this world without leaving a trace! (Hajime Isayama would agree)

First, the reason.

Most likely reason: macOS does not support hot-swapping of external hard drives. If you unplug a portable hard drive or U disk without ejecting it first, it will not be recognized the next time you connect it.

Other reasons: storage device damage, unsupported file format, etc.

Solution:

Caused by hot-swapping:

Press command+space, type terminal to open the Terminal and run the following command:

1 diskutil list

You can see the disk loading status:

Find the name of the U disk or hard drive; mine is called “路草泽” (Lu Cao Ze). As shown in the picture. Its disk identifier is disk2s1, in the identifier column.

If you can’t find it, that means it is caused by other reasons. Solutions for those will be discussed later.

Continue to run the following commands in Terminal (remember to replace the bold part):

1 sudo diskutil mount /dev/disk2s1 2 sudo diskutil mountDisk /dev/disk2s1

Check if the disk is restored; if not, then run

1 sudo fsck_hfs -fy /dev/disk2s1 2 sudo diskutil mount /dev/disk2s1 3 sudo diskutil mountDisk /dev/disk2s1

At this point, the disk should be restored. If you are still unsure, you can open Disk Utility, select “First Aid” or “Repair” in the upper right corner.

Other causes:

Device damage: clean the connection port rust… for mechanical hard drives, send it to Taobao for repair… after all, it’s a physical medium.

Unsupported format: first back up on Windows, then format and modify the file system format.