The Community Forum

General Help & Advice => Linux Support => Topic started by: freelancehelp on July 07, 2021, 02:15:13 PM

Title: Rsync
Post by: freelancehelp on July 07, 2021, 02:15:13 PM
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/.

where users-name is the name of the user.

Can anyone help to solve this problem, please ?
Title: Re: Rsync
Post by: Keith on July 07, 2021, 03:33:43 PM
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.

Title: Re: Rsync
Post by: Mad Penguin on July 15, 2021, 09:48:36 AM
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.
Title: Re: Rsync
Post by: Keith on July 21, 2021, 01:14:00 PM
With regard to suspect device;  I found this useful web page for checking the block integrity of USB sticks: ( 

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.