bugrdiff-backup - Bugs: bug #13476, hardlink problem when devloc...

 
 

bug #13476: hardlink problem when devloc changes but inode doesn't

Submitter:  dean gaudet <dgaudet>
Submitted:  Mon 20 Jun 2005 01:25:57 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  dgaudet Open/Closed:  Closed
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 20 Jun 2005 01:25:57 AM UTC, original submission:  

this problem occurs when you have a pair of hardlinked files, which have been backed up at least once.  then you modify the file and change the devloc without changing the inode.

this sort of thing can happen when you move the disk to another controller -- in my case it was happenning regularly because i was using LVM snapshot volumes and the snapshot device number is not fixed from one backup to the next.

here is a script which demonstrates the problem on linux using an ext2 image file, sudo, and two different loopback devices.

mkdir src || exit 1
dd if=/dev/zero of=src.img bs=1M count=2 || exit 1
mke2fs -qF -m 0 src.img || exit 1
sudo mount -o loop=/dev/loop3 src.img src || exit 1
echo hi >src/a || exit 1
ln src/a src/b || exit 1
rdiff-backup src dst || exit 1
sudo umount src
sudo mount -o loop=/dev/loop4 src.img src || exit 1
mv src/b src/c || exit 1
sleep 1; rdiff-backup src dst || exit 1
sleep 1; rdiff-backup src dst || exit 1
sudo umount src || exit 1

the second invocation of rdiff-backup produces a broken metadata file with two different DeviceLoc for the hardlinked files.  the third (and any subsequent invocations) produce a bogus warning, but the problem is never resolved:

Warning: Attempt to rename over same inode: dst/rdiff-backup.tmp.1 to dst/c

i believe the fix is to treat devloc similar to inode in RORPath.__eq__ ... we're ignoring devloc currently, and that is broken... you can't compare inodes without comparing devices.  the attached patch implements this idea.

-dean

dean gaudet <dgaudet>
Group administrator

 

Attached Files

Attached Files
file #3108:  hardlink2.patch added by dgaudet (1.0KiB - text/x-patch - proposed fix)

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

History

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-06-28 dgaudet Assigned toNone dgaudet
    Open/ClosedOpen Closed
2005-06-28 dgaudet StatusNone Fixed
2005-06-20 dgaudet Attached File- Added hardlink2.patch, #2616

Back to the top

Powered by Savane 3.16.
Corresponding source code