In linux, fsck gpt external hard disk fsck fail to check a gpt partitioned external hdd.
What to do? I cannot fsck the filesystem of that disk! How I can check my filesystem? What I am doing wrong?
Below is some information on my external HDD.
elias@eliasc:~$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 931.5 GiB, 1000170586112 bytes, 1953458176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 66BAEFE2-F3F9-491C-B40F-C964F28AE483
Device Start End Sectors Size Type
/dev/sdc1 2048 1953456127 1953454080 931.5G Microsoft basic data
elias@eliasc:~$ sudo fsck /dev/sdc
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdc
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Found a gpt partition table in /dev/sdc
sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): i
Using 1
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 593BA7FF-C46F-4A0E-BAAF-FF505C0425F8
First sector: 2048 (at 1024.0 KiB)
Last sector: 1953456127 (at 931.5 GiB)
Partition size: 1953454080 sectors (931.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'MyPassport'
Command (? for help): v
No problems found. 4029 free sectors (2.0 MiB) available in 2
segments, the largest of which is 2015 (1007.5 KiB) in size.
As of 15Jul2020, There is no option to check filesystem integrity of a Hard disk formatted as NTFS under Linux.
What I did?
sudo usermod -a -G disk $USER
sudo usermod -a -G vboxusers $USER
sudo /sbin/vboxconfig
VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sdX
This process fixed my NTFS filesystem that it was fault. I hope it helpt you too.
If you find any easier solution, only under Linux, please post it.