Updates:

Similar topics mod installed, currently shown at the end of a topic

Rsync

Started by freelancehelp, July 07, 2021, 02:15:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freelancehelp

Rsync has been successfully run for quite a few years on a Debian system. The home directory has been
regularly transferred to a FAT32 USB drive.

Recently, rsync has been hanging.

Rsync just hangs at a particular small file that it gets to and doesn't move on - no
error message, so it doesn't crash, it just hangs.

The command is of the form :-

rsync -v -a --max-size=4GB --delete /home/users-name/.
/media/memstick/.

where users-name is the name of the user.

Can anyone help to solve this problem, please ?

Keith

#1
What kind of file is it (system, binary, *.odt, *.mp4 etc.) and its size?
Can you access and use the file in a normal manner? 
Your command: rsync -v -a --max-size=4GB --delete /home/users-name/.  /media/memstick/ indicates you may be copying the whole of your system - which will be a lot.  How big is your USB drive?
Try:du -sh .and post the output.

Keith


Mad Penguin

You could try adding "--progress" to see how far it gets, however it would seem possible that your memory stick / flash drive is worn (or full). Have you tried backing it up to an alternate location? Flash storage devices historically employ lots of different mechanisms to handle the limited write cycles feature of flash, i.e. that you can only write to each location up to (n) times" where (n) can be as low as 1000. Ultimately, despite lots of space showing as free on the device, it can effectively have run out of available writable blocks .. and drivers can be pretty "bad" at handling this edge-case - infinite retries are not unknown.
https://twitter.com/garethbult
https://gareth.bult.co.uk

Keith

With regard to suspect device;  I found this useful web page for checking the block integrity of USB sticks:  https://superuser.com/questions/376274/how-to-check-the-physical-health-of-a-usb-stick-in-linux#376278 (https://superuser.com/questions/376274/how-to-check-the-physical-health-of-a-usb-stick-in-linux#376278). 

A test with a very old 1GB USB stick gave this:
[email protected]:~$ umount /dev/sdb1
[email protected]:~$ sudo badblocks -nvs /dev/sdb1
Checking for bad blocks in non-destructive read-write mode
From block 0 to 1004527
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done                                                 
Pass completed, 0 bad blocks found. (0/0/0 errors)
[email protected]:~$

During the test, which took 1hr, progress is reported continuously:  %done, minutes, error numbers.

Keith