Solutions to the problem that Ubuntu is stuck when copying large files and can’t mount mobile hard disk normally

Recently, in the process of copying a large number of files (more than 100g) from the Ubuntu system to the mobile hard disk, there is a situation of stuck. At the beginning, it used the direct folder copy and paste method. When it got stuck, it was replaced by the “SCP – R” method, but it didn’t work.

The main reason for this problem is that the write cache of kernel in Ubuntu system is too large, so that there is a congestion bottleneck when writing from high-speed storage to low-speed devices.

The solution is to avoid using file manager and SCP. When copying large files, the following instructions can be used:

rsync -avP source/ target/

Rsync is a remote data synchronization tool, which can quickly synchronize the files between multiple hosts through LAN/WAN, and view the file transfer process and rate, which is very convenient.

In addition, when the copy to the mobile hard disk is stuck, the file index directory is damaged due to forcibly pulling out the mobile hard disk, which makes the Ubuntu system unable to mount the mobile hard disk, and the following error prompt appears:

Failed to mount '/dev/sdb1': Input/output error 
NTFS is either inconsistent, or there is a hardware fault, or it's a 
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows 
then reboot into Windows twice. The usage of the /f parameter is very 
important! If the device is a SoftRAID/FakeRAID then first activate 
it and mount a different device under the /dev/mapper/ directory, (e.g. 
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation 
for more details.

According to the above tips, it can be solved in Windows system  
1. Enter CMD in “run” under windows to enter DOS command line window  
2. Find the volume name of the mobile hard disk (such as G:)  
3. On the command line, enter:

chkdsk G:/f

CHKDSK command is used to scan disk, automatically check and fix index error. There are three stages after the instruction input in step 3 above. If there are a large number of files, it will take a long time, and you need to wait patiently for the repair to be completed. After that, it can be mounted normally in the Ubuntu system.

Read More: