[Bug 10637] New: rsync --link-dest should break hard links when encountering "Too many links"

samba-bugs at samba.org samba-bugs at samba.org
Tue May 27 09:06:19 MDT 2014


https://bugzilla.samba.org/show_bug.cgi?id=10637

           Summary: rsync --link-dest should break hard links when
                    encountering "Too many links"
           Product: rsync
           Version: 3.0.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: martin.von.wittich at iserv.eu
         QAContact: rsync-qa at samba.org


We're using rsync --link-dest to efficiently store backups. Unfortunately,
sometimes our backup breaks because a user has created many identical copies of
a mail in our Cyrus mailserver (which uses hard links to store identical
mails), because (n copies of a mail) * (m hard linked backups) easily exceeds
the hard link limit of ext4. This causes an error message like the following:

rsync: link
"/var/lib/iserv/backup/mnt/mapper-martin-ext4/lvmtest/partial/hardlinks/14497"
=> hardlinks/1 failed: Too many links (31)
File-list index 0 not in 5087 - 35088 (finish_hard_link) [generator]
rsync error: protocol incompatibility (code 2) at rsync.c(652)
[generator=3.0.9]
rsync error: received SIGUSR1 (code 19) at main.c(1316) [receiver=3.0.9]

It would be nice to have an additional option like --break-hard-links that
works like this:

1) if the --link-dest dir contains an identical version of the file that should
be copied, try to create a hard link of this file
2) if the link syscall failed with EMLINK, copy the file instead
3) additional identical copies can now be hardlinked to the newly copied file,
so jump to step 1.

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list