Formatting the disk may be avoided by using fsck
In a case such as Sergey’s, where the problem is caused by a faulty vfat rather than some weirdness on Ubuntu’s side, formatting the disk may be avoided by using fsck:
$ sudo fsck.vfat -r /dev/sdg1 # replace sdg1 with your usb drive partition device file