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

 
 

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

Submitted by:  dean gaudet <dgaudet>
Submitted on:  Mon 20 Jun 2005 01:25:57 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: dean gaudet <dgaudet>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Jun 2005 05:18:45 AM UTCdgaudetAssigned toNone=>dgaudet
  Open/ClosedOpen=>Closed
Tue 28 Jun 2005 04:48:02 AM UTCdgaudetStatusNone=>Fixed
Mon 20 Jun 2005 01:25:57 AM UTCdgaudetAttached File-=>Added hardlink2.patch, #2616

Back to the top


Powered by Savane 3.1-cleanup1