The starting point of my problem is “Input/output error” when accessing some directories inside an ext4 partition that is encrypted. So I set out to do fsck based on this solution, that is, something like this:
$ sudo cryptsetup luksOpen /dev/sdb2 _sbd2
$ which fsck.ext4
/sbin/fsck.ext4
$ sudo /sbin/fsck.ext4 /dev/mapper/_sdb2
e2fsck 1.44.1 (24-Mar-2018)
/sbin/fsck.ext4: No such file or directory while trying to open /dev/mapper/_sdb2
Possibly non-existent device?
There is a similar problem here, but I’ve already used the suggested remedy. Using /sbin/e2fsck
also fails.
So: what could be the problem?
Other info:
$ ls -la /dev/mapper
total 0
drwxr-xr-x 2 root root 80 Mar 7 14:49 .
drwxr-xr-x 22 root root 4560 Mar 7 14:49 ..
crw——- 1 root root 10, 236 Mar 7 14:45 control
lrwxrwxrwx 1 root root 7 Mar 7 14:49 _sbd2 -> ../dm-0
$ sudo fdisk -l
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
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: 0x8721c879Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 608645119 608643072 290.2G 83 Linux
/dev/sda2 608647166 625141759 16494594 7.9G 5 Extended
/dev/sda5 608647168 625141759 16494592 7.9G 82 Linux swap / SolPartition 2 does not start on physical sector boundary.
Disk /dev/sdb: 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: dos
Disk identifier: 0xcf7b9f14Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 564858879 564856832 269.4G 7 HPFS/NTFS/exFA
/dev/sdb2 1134254080 1953454079 819200000 390.6G e8 unknown
/dev/sdb3 564858880 1134254079 569395200 271.5G 83 LinuxPartition table entries are not in disk order.
Disk /dev/mapper/_sbd2: 390.6 GiB, 419428302848 bytes, 819195904 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