I recently had a huge cascade mdadm raid failure, where 3 or 4 disks had to be ddrescued to other disks and then force assembled back together. Afterwards the ext4 partition wouldn't mount because of invalid group descriptors (and who knows what else). I ran fsck -y /dev/md0 and it had to fix tons of stuff in many passes. The file system is mounting now and superficially everything looks fine, but I am worried about possibly having "bits transposed" etc in random files. (is this even possible?)
I have a backup of the array, and I was trying to run rsync (dry-runs) to compare volumes and look for non matching files. Rsync by default only checks file sizes so I am using the checksum option.
My rsync command is like this
Code:
rsync -avHcn /media/md1 /media/vault
(md1 is the backup and vault is the primary)
This returns TONS of files (maybe everything?) so I broke it down smaller
Code:
rsync -avHc --dry-run /media/md1/Scripts /media/vault/Scripts
sending incremental file list
Scripts/
Scripts/SortFiles2 (another copy).sh
Scripts/SortFiles2 (copy).sh
Scripts/SortFiles2.sh
Scripts/SortFiles3.sh
Scripts/Sortfiles1.sh
sent 268 bytes received 31 bytes 598.00 bytes/sec
total size is 13350 speedup is 44.65 (DRY RUN)
But then I run
Code:
md5sum /media/md1/Scripts/Sortfiles1.sh /media/vault/Scripts/Sortfiles1.sh
34c72e175a02e3bafdf172a9a4465c92 /media/md1/Scripts/Sortfiles1.sh
34c72e175a02e3bafdf172a9a4465c92 /media/vault/Scripts/Sortfiles1.sh
also running 'cmp' on the files returns nothing, and even running the same rsync command on one particular file shows no changes
Code:
rsync -avH --dry-run /media/md1/Scripts/Sortfiles1.sh /media/vault/Scripts/Sortfiles1.sh
sending incremental file list
sent 57 bytes received 12 bytes 138.00 bytes/sec
total size is 4333 speedup is 62.80 (DRY RUN)
Am I missing something with the rsync syntax? My understanding is that one -v should only list the files that have differences detected and would be copied in a standard non-dry-run.
I also noticed that if I do the same rsync command with slashes at the end of the directories (to mean the contents of the directories as opposed to the directories themselves, which should really be irrelevant here as long as they are consistent)
Code:
rsync -avHc --dry-run /media/md1/Scripts/ /media/vault/Scripts/
sending incremental file list
sent 234 bytes received 12 bytes 492.00 bytes/sec
total size is 13350 speedup is 54.27 (DRY RUN)
I'm really confused, am I just misunderstanding the -v option in rsync? Why does it list them when comparing Scripts but not Scripts/? Is there a better tool for doing what I'm trying to do?
Bookmarks