I used sudo mkfs.vfat /dev/sdb
to format a flash drive (I didn't notice /sd*
) but accidentally my Seagate external hard disk (/dev/sdb
) started being formatted and immediately after few seconds I cancelled that command. I was still able to use the hard disk as it was already mounted to my Ubuntu machine, but when I unmounted it and tried to access it Ubuntu didn't detect it anymore.
Results of sudo mount /dev/sdb /media/backup
:
mount: /media/backup: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.
Results of sudo fdisk -l # pasting the last few paragraphs
:
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7f7a3175
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 199999487 199997440 95.4G 83 Linux
/dev/sda2 200001534 1953523711 1753522178 836.1G 5 Extended
/dev/sda5 200001536 1953523711 1753522176 836.1G 83 Linux
Partition 2 does not start on physical sector boundary.
Disk /dev/sdb: 3.65 TiB, 4000787029504 bytes, 7814037167 sectors
Disk model: BUP Portable
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Results of df -h
:
Filesystem Size Used Avail Use% Mounted on
udev 12G 0 12G 0% /dev
tmpfs 2.4G 1.8M 2.4G 1% /run
/dev/sda1 94G 9.4G 80G 11% /
tmpfs 12G 197M 12G 2% /dev/shm
tlsblkmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 12G 0 12G 0% /sys/fs/cgroup
/dev/loop0 56M 56M 0 100% /snap/core18/1988
/dev/loop2 32M 32M 0 100% /snap/snapd/11036
/dev/loop1 65M 65M 0 100% /snap/gtk-common-themes/1514
/dev/loop3 219M 219M 0 100% /snap/gnome-3-34-1804/66
/dev/loop5 33M 33M 0 100% /snap/snapd/11107
/dev/loop4 52M 52M 0 100% /snap/snap-store/518
/dev/sda5 823G 716G 65G 92% /home
tmpfs 2.4G 28K 2.4G 1% /run/user/1000
Results of lsblk
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 55.5M 1 loop /snap/core18/1988
loop1 7:1 0 64.8M 1 loop /snap/gtk-common-themes/1514
loop2 7:2 0 31.1M 1 loop /snap/snapd/11036
loop3 7:3 0 219M 1 loop /snap/gnome-3-34-1804/66
loop4 7:4 0 51M 1 loop /snap/snap-store/518
loop5 7:5 0 32.3M 1 loop /snap/snapd/11107
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 95.4G 0 part /
├─sda2 8:2 0 1K 0 part
─sda5 8:5 0 836.1G 0 part /home
sdb 8:16 0 3.7T 0 disk
My PhD career is based on data inside it. Please help to restore my data.
umount
the cached data was lost, trying to read the new partition table (which may have been corrupted if it hadn't been allowed to complete; if would have been empty on completion anyway). – guiverc Mar 21 '21 at 10:09/dev/sdb
refers to a drive (device), where the partition you mount is usuallysdb1
etc, ie. you mount partitions and not devices/drives. – guiverc Mar 21 '21 at 10:10