# This command lists all your disks(internal & external)
$ diskutil list
# The result would be something like:
# /dev/disk6[this number is important] (external, physical):
# After getting this number, we should do:
# NOT JHFS+ represents the format, you can always set any format you needed here.
$ diskutil eraseDisk JHFS+ [name] /dev/disk[number_you_get_from_last_step]
After this you operating system should be able to recognize your disk without any issue.