I am moving some content from one old 6TB harddrive to a new 20TB harddrive using rsync
.
On some files it is having trouble reading:
rsync: read errors mapping "/storage/storage1/files/file.mkv": Input/output error (5)
WARNING: files/file.mkv failed verification -- update discarded (will try again).
This is the rsync
command I am running:
rsync --verbose --recursive --human-readable --progress --executability \
--acls --xattrs --perms --owner --group --times --devices --specials --links \
--remove-source-files --whole-file /storage/storage1 /storage/storage8
Is there some problems with the files, or the harddrive?
Running smartctl
the harddrive gets a PASS.
When this happens the speed reading the file goes very very slow with only a few hundreds kB/s.
Is there any way to skip these files with rsync? It takes for ever for it to work through these files.
The file system is XFS.
hui
January 28, 2023, 12:05pm
2
The rsync input/output error(5) occurs mainly due to disk defects, insufficient privileges, file lock by anti-virus programs and so on
Est. reading time: 3 minutes
https://rsync.samba.narkive.com/xJb0Aabj/warning-file-failed-verification-update-discarded-will-try-again
I suspect disc defects.
My user has sufficient privileges to copy the files. It is the owner of the files.
I have no AntiVirus running
Trying to copy the files with cp
I am getting the same error.
Is there any tool I can be running to identify all files with errors?
Because when running rsync it tries very hard to read, with low speed in 100kB/s.
I want to avoid those files, and copy all those who are fine to new drive.
Perhaps this
https://wiki.archlinux.org/title/Identify_damaged_files#XFS
Is there any options to rsync
that can skip files when read speed goes below a certain value?
When the read speed is kb/s then something is wrong.
DJViking:
I suspect disc defects.
May be. Show the kernel log at the time this problem happened.
From /var/log/messages
2023-01-28T16:45:46.164035+01:00 alnitak kernel: [92853.902207] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
2023-01-28T16:45:46.164056+01:00 alnitak kernel: [92853.902210] ata5.00: BMDMA stat 0x25
2023-01-28T16:45:46.164058+01:00 alnitak kernel: [92853.902213] ata5.00: failed command: READ DMA EXT
2023-01-28T16:45:46.164059+01:00 alnitak kernel: [92853.902218] ata5.00: cmd 25/00:00:68:f7:74/00:04:c4:01:00/e0 tag 0 dma 524288 in
2023-01-28T16:45:46.164061+01:00 alnitak kernel: [92853.902218] res 51/40:00:68:fa:74/40:04:c4:01:00/e0 Emask 0x9 (media error)
2023-01-28T16:45:46.164062+01:00 alnitak kernel: [92853.902219] ata5.00: status: { DRDY ERR }
2023-01-28T16:45:46.164064+01:00 alnitak kernel: [92853.902221] ata5.00: error: { UNC }
2023-01-28T16:45:46.166025+01:00 alnitak kernel: [92853.907429] ata5.00: configured for UDMA/133
2023-01-28T16:45:46.166034+01:00 alnitak kernel: [92853.907683] sd 4:0:0:0: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
2023-01-28T16:45:46.166036+01:00 alnitak kernel: [92853.907685] sd 4:0:0:0: [sdf] tag#0 Sense Key : Medium Error [current]
2023-01-28T16:45:46.166050+01:00 alnitak kernel: [92853.907687] sd 4:0:0:0: [sdf] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed
2023-01-28T16:45:46.166053+01:00 alnitak kernel: [92853.907690] sd 4:0:0:0: [sdf] tag#0 CDB: Read(16) 88 00 00 00 00 01 c4 74 f7 68 00 00 04 00 00 00
2023-01-28T16:45:46.166054+01:00 alnitak kernel: [92853.907693] blk_update_request: I/O error, dev sdf, sector 7590967144 op 0x0:(READ) flags 0x80700 phys_seg 104 prio class 0
2023-01-28T16:45:46.166056+01:00 alnitak kernel: [92853.907724] ata5: EH complete
I run smartcl just now. Seems the drive is failing
alnitak:/storage/storage7/Movies/Temp # smartctl -H /dev/sdf
smartctl 7.2 2021-09-14 r5237 [x86_64-linux-5.3.18-150300.59.68-default] (SUSE RPM)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
Failed Attributes:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 001 001 051 Pre-fail Always FAILING_NOW 11057
It seems nothing can be copied from the drive now. I have tried multiple files, and all get read error.
kasi042
January 28, 2023, 4:23pm
10
It may be too late already. However, you can use unison for such cases. You can create profiles in which you can set excludes to specific files or subfolders.
Works in bash or with GUI. GUI is nice for troubleshooting.
I tried unison
now. After creating a synchronization profile with a source and destination directory, it is now running with “Looking for changes”. It takes for ever to finish.
@DJViking sure it’s not a failing cable, or connection?
Not sure. Maybe.
I could try disconnecting the harddrive and connecting it to my USB.
I plugged out my failing harddrive and connected it to USB.
Running smartctl -H /dev/sgd
it still reports it as failing.
DJViking:
20TB
That is rather cutting edge tech. Wonder if it requires special drivers???
The Seagate Exos X20 20TB worked fine in Linux. I did not need to install any drivers nor do any configuration.