The command you ran formatted the drive to like a "super floppy" which basically formatted drive.
I wrote another answer here a while ago about file and partition recovery and using PhotoRec and Testdisk.
When in doubt of a command and what it does always look in the man pages.
~$ man mkdosfs
NAME
mkfs.fat - create an MS-DOS filesystem under Linux
DESCRIPTION
mkfs.fat is used to create an MS-DOS filesystem under Linux on a device
(usually a disk partition). DEVICE is the special file corresponding
to the device (e.g. /dev/sdXX). BLOCK-COUNT is the number of blocks on
the device. If omitted, mkfs.fat automatically determines the filesys‐
tem size.
Which will format a drive to a MS-DOS
filesystem.
The -n
is only a name so no worries there, but the -I
shows this:
-I It is typical for fixed disk devices to be partitioned so, by
default, you are not permitted to create a filesystem across the
entire device. mkfs.fat will complain and tell you that it refuses
to work. This is different when using MO disks. One doesn't
always need partitions on MO disks. The filesystem can go directly
to the whole disk. Under other OSes this is known as the 'super‐
floppy' format. This switch will force mkfs.fat to work properly.
The last part shows that it forces mkfs.fat
to work properly. Which means that it forced the program to format the drive as a MS-DOS
partition wiping out everything you had on it. It will mount as a drive, but will not contain a normal partition on it like standard hard drives have. If you don't write anything to that drive since the format, there is a chance that you can get everything back, but there is never a guarantee of getting it back.
Hope this helps!