M
M
Misty Hedgehog2016-01-11 22:00:21
linux
Misty Hedgehog, 2016-01-11 22:00:21

How to fix "Input/output error" errors on Ext4?

Good day, %username%!
There is an old HDD WD Green on 2Tb, which frankly began to act up (there were write errors when writing to disk, reading - without problems). A replacement HDD WD Red was purchased for him, similarly to 2Tb. Both screws were successfully connected to a stationary machine running Win7, "mounted" using "Ext2Fsd" and using "MiniTool Partition Wizard Free" a partition was created on it in Ext4 in all space (well, I was too lazy to create a boot image with * nix, I confess) .
In general, all data was successfully transferred from the old piece of iron to the new one using copy-paste (access rights, of course, suffered, but they are not critical). Errors crawled out in some places, but purely for reading, and not critical data. After that, the piece of iron was put in its native place under the control of CentOS 7. The partition was successfully mounted, but when trying, for example, to make a recursive chmod under the root, errors like:

[email protected]:/shares# chmod -R 777 ./public/
chmod: невозможно получить доступ к «./public/Soft/AntiVirusers/nod32/Tools/NOD32view7_01/NOD32view.psw»: Ошибка ввода/вывода
chmod: невозможно получить доступ к «./public/Soft/ОСИ/Install tool/WinSetupFromUSB-1-6-beta1/files/MULTIpartitionUSBstick/USEonXPor2003_32bitsSYSTEMSonly»: Ошибка ввода/вывода
chmod: невозможно получить доступ к «./public/Soft/ОСИ/Install tool/WinSetupFromUSB-1-6-beta1/files/tools/restore»: Ошибка ввода/вывода
chmod: невозможно получить доступ к «./public/Soft/ОСИ/Install tool/WinSetupFromUSB-1-6-beta1/files/winsetup/usbdrive.tag»: Ошибка ввода/вывода

We look in the directory, and we see:
[email protected]:/shares# ls -la ./public/Soft/AntiVirusers/nod32/Tools/NOD32view7_01/
ls: невозможно получить доступ к ./public/Soft/AntiVirusers/nod32/Tools/NOD32view7_01/NOD32view.psw: Ошибка ввода/вывода
итого 64
drwxrwxrwx 9 nobody users  4096 янв 11 17:49 .
drwxrwxrwx 3 nobody users  4096 янв 11 17:49 ..
drwxrwxrwx 2 nobody users  4096 янв 11 17:49 avz_upd
drwxrwxrwx 9 nobody users  4096 янв 11 17:49 download
drwxrwxrwx 2 nobody users  4096 янв 11 17:49 drweb_upd
drwxrwxrwx 6 nobody users  4096 янв 11 17:49 eset_upd
drwxrwxrwx 2 nobody users  4096 янв 11 17:49 kav_upd
-rwxrwxrwx 1 nobody users  2724 авг  3  2014 NOD32view.ini
-rwxrwxrwx 1 nobody users 23613 авг  3  2014 NOD32view.log
-????????? ? ?      ?         ?            ? NOD32view.psw
drwxrwxrwx 2 nobody users  4096 янв 11 17:49 Temp
drwxrwxrwx 2 nobody users  4096 янв 11 17:49 tr_upd

Check fs says everything is ok:
[email protected]:/# umount /shares/

[email protected]:/shares# fdisk -l

Disk /dev/sda: 8012 MB, 8012390400 bytes, 15649200 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
Disk label type: dos
Disk identifier: 0x000acd0f

Устр-во Загр     Начало       Конец       Блоки   Id  Система
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048    15648767     7311360   8e  Linux LVM

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 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
Disk label type: dos
Disk identifier: 0x73cf5af9

Устр-во Загр     Начало       Конец       Блоки   Id  Система
/dev/sdb1            2048  3907026943  1953512448   83  Linux

Disk /dev/mapper/centos-root: 6635 MB, 6635388928 bytes, 12959744 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

Disk /dev/mapper/centos-swap: 801 MB, 801112064 bytes, 1564672 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

[email protected]:/# fsck.ext4 --help
fsck.ext4: неверный ключ — «-»
Usage: fsck.ext4 [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
                [-I inode_buffer_blocks] [-P process_inode_size]
                [-l|-L bad_blocks_file] [-C fd] [-j external_journal]
                [-E extended-options] device

Emergency help:
 -p                   Automatic repair (no questions)
 -n                   Make no changes to the filesystem
 -y                   Assume "yes" to all questions
 -c                   Check for bad blocks and add them to the badblock list
 -f                   Force checking even if filesystem is marked clean
 -v                   Be verbose
 -b superblock        Use alternative superblock
 -B blocksize         Force blocksize when looking for superblock
 -j external_journal  Set location of the external journal
 -l bad_blocks_file   Add to badblocks list
 -L bad_blocks_file   Set badblocks list

[email protected]:/# fsck.ext4 -f -y /dev/sdb1
e2fsck 1.42.9 (28-Dec-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
data: 54874/488407040 files (1.1% non-contiguous), 237102044/488378112 blocks

And there are quite a lot of such errors, but the data is not at all critical. I would be glad to "just demolish the broken files." Google advises to go through the reformatting procedure (I really don’t want to).
Question for you, comrades - how best to fix these errors?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Tsilyurik, 2016-01-11
@Olej

Question for you, comrades - how best to fix these errors?

But I don't think so ;-)
You don't need shitty "Win7" to climb noble Linux disks. ;)
If I were you, I would just connect both disks in Linux , and make a new copy of the disk:
# cp /dev/sda /dev/sdb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question