How to fix corrupt packet error for with rsync for large files

In order to have local copies of my web pages hosted on VPS I have configured rsync cronjob to sync everything during the night to my local box.

Sometimes with larger files you can encounter errors like these:

Received disconnect from [YOUR_IP]: 2: Packet corrupt
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [sender=3.1.1]

Continue reading “How to fix corrupt packet error for with rsync for large files”

High Performance USB stick formatting with ext4

To format my USB sticks that I use following set of commands:

Assuming my USB stick is recognized as sdc, and has a primary partition created this is the set of commands that I use:

# create ext4 filesystem without journal
 mkfs.ext4 -O ^has_journal /dev/sdc1

# give your newly formatted partition a name
 e2label /dev/sdc1 storage

# Use data mode for filesystem as writeback for better performance
 tune2fs -o journal_data_writeback /dev/sdc1 

# Disable reserved space on my 57GB drive it wastes 5% which is 3GB
 tune2fs -m 0 /dev/sdc1