bugrdiff-backup - Bugs: bug #42319, NFS not preserving ownership...

 
 

bug #42319: NFS not preserving ownership causes hardlinks to report "Update mirror temp file ... does not match"

Submitted by:  None
Submitted on:  Thu 08 May 2014 01:49:58 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Ready For Test
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 12 Feb 2016 09:05:44 AM UTC, comment #2:

Patch needs testing on latest version.

david kempe <davekempe>
Project Administrator
Thu 15 May 2014 09:48:27 PM UTC, comment #1:

More details of the investigation I performed ...

All files reporting UpdateError have multiple hard links:

# ls -il /bin/{ed,red}
2752571 -rwxr-xr-x. 2 root root 10240 Apr 26 20:52 /bin/ed
2752571 -rwxr-xr-x. 2 root root 10240 Apr 26 20:52 /bin/red
# ls -il /lib/terminfo/v/{vt100,vt100-am}
1969383 -rw-r--r--. 2 root root 1194 Aug 18 2010 /lib/terminfo/v/vt100
1969383 -rw-r--r--. 2 root root 1194 Aug 18 2010 /lib/terminfo/v/vt100-am
# ls -il /lib/terminfo/v/vt2?0
1969382 -rw-r--r--. 2 root root 1279 Aug 18 2010 /lib/terminfo/v/vt200
1969382 -rw-r--r--. 2 root root 1279 Aug 18 2010 /lib/terminfo/v/vt220
# ls -il /sbin/dm*_tool
3014987 -rwxr-xr-x. 2 root root 13168 Jun 22 2012 /sbin/dm_dso_reg_tool
3014987 -rwxr-xr-x. 2 root root 13168 Jun 22 2012 /sbin/dmevent_tool
# ls -il /sbin/{fsck.ext*,e2fsck}
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/e2fsck
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext2
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext3
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext4
3014769 -rwxr-xr-x. 5 root root 197352 Nov 22 12:56 /sbin/fsck.ext4dev

etc.

Applied debugging patch to rdiff-backup which added extra logging messages into rpath.py equal_loose(). It being the function which triggers rdiff-backup to report "Update mirror temp file ... does not match source" errors. The patch adds "Loose compare ..." log messages to report every the cause of every return path from the equal_loose().

(See attached: rdiff-backup-debug-causes-of-update-error-d1.patch
Not intended for applying upstream)

Log messages from rdiff-backup with verbose >= 7:

Sun May 4 14:41:54 2014 Processing changed file bin/red
Sun May 4 14:41:54 2014 Hard linking /mnt/autofs/backup/bin/rdiff-backup.tmp.1 to /mnt/autofs/backup/bin/ed
Sun May 4 14:41:54 2014 Loose compare ('bin', 'red') to ('bin', 'rdiff-backup.tmp.1'): user group mismatch: user_group.map_rpath(first)=(0, 0) != second.getuidgid()=(99, 99)
Sun May 4 14:41:54 2014 UpdateError bin/red Updated mirror temp file /mnt/autofs/backup/bin/rdiff-backup.tmp.1 does not match source
Sun May 4 14:41:54 2014 Deleting /mnt/autofs/backup/bin/rdiff-backup.tmp.1

Same "user group mismatch" issue for every UpdateError.

Identify that NFS share was not preserving uid and gids. (See testing in earlier update).

Thanks,
Mike

(file #31383)

Anonymous
Thu 08 May 2014 01:49:58 PM UTC, original submission:

After an OS upgrade, all changed files with multiple hard links failed to be backed up reporting "Update mirror temp file ... does not match".

E.g.
UpdateError bin/red Updated mirror temp file /mnt/autofs/backup/bin/rdiff-backup.tmp.1 does not match source
UpdateError lib/terminfo/v/vt100-am Updated mirror temp file /mnt/autofs/backup/lib/terminfo/v/rdiff-backup.tmp.341 does not match source
UpdateError lib/terminfo/v/vt220 Updated mirror temp file /mnt/autofs/backup/lib/terminfo/v/rdiff-backup.tmp.342 does not match source
UpdateError sbin/dmevent_tool Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.345 does not match source
UpdateError sbin/fsck.ext2 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.346 does not match source
UpdateError sbin/fsck.ext3 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.347 does not match source
UpdateError sbin/fsck.ext4 Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.348 does not match source
UpdateError sbin/fsck.ext4dev Updated mirror temp file /mnt/autofs/backup/sbin/rdiff-backup.tmp.349 does not match source

It is because I was backing up to an NFS share which didn't preserve uid and gids. Instead they were all mapped to nobody.

# cd /backup
# touch foo
# chown bin:bin foo
# ls -l foo
-rw-r--r--. 1 nobody nobody 0 May 7 20:52 foo

Chown reports succcess but, but on querying the uid and gid it always reported 99, 99 (nobody, nobody). For single linked changed files I assume that rdiff-backup gets the uid/gid from the source. However for an updated file with multiple hard links rdiff-backup creates the hard link on the destination and checks the uid/gid match the metadata. This fails resulting in the "Updated mirror temp file" error message.

Fix by making rdiff-backup confirm the uid/gid actually changes when testing the backup destination before enabling the ownership changing ability.

Thanks,
Mike

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31336:  rdiff-backup-confirm-chown-succeeded-v1.patch added by None (1KiB - text/x-patch - Fix: Confirm chown succeeds when testing backup destination abilities (v1))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by davekempe (Posted a comment)
  • -unavailable- added by sliwowitz
  •  

    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
    Fri 12 Feb 2016 09:05:44 AM UTCdavekempeStatusNone=>Ready For Test
    Sat 17 Oct 2015 09:31:21 PM UTCsliwowitzCarbon-Copy-=>Added sliwowitz
    Thu 15 May 2014 09:48:27 PM UTCNoneAttached File-=>Added rdiff-backup-debug-causes-of-update-error-d1.patch, #31383
    Thu 08 May 2014 01:49:58 PM UTCNoneAttached File-=>Added rdiff-backup-confirm-chown-succeeded-v1.patch, #31336

    Back to the top


    Powered by Savane 3.1-cleanup1