rsnapshot / cp-al: Doppelte Dateien auf eingehängtem NFS-Share

1013
lajuette

Das Szenario

Ich versichere einen meiner Debian-Wheezy-Rechner über rsnapshot. Das Zielverzeichnis ist eine gemountete NFS-Freigabe. Ein Qnap NAS stellt dieses Zielverzeichnis bereit.

Das Problem

Rsnapshot beschwert sich jedoch über bereits vorhandene Dateien, wenn versucht wird, einen neuen Snapshot über cp -al zu erstellen. Es spielt keine Rolle, ob ich gnu-cp oder rsnapshots cp verwende:

root@shuttle:~# rsnapshot -v daily echo 25852 > /var/run/rsnapshot.pid  /bin/rm -rf /mnt/backup/rsnapshot/daily.6/  mv /mnt/backup/rsnapshot/daily.5/ /mnt/backup/rsnapshot/daily.6/  mv /mnt/backup/rsnapshot/daily.4/ /mnt/backup/rsnapshot/daily.5/  mv /mnt/backup/rsnapshot/daily.3/ /mnt/backup/rsnapshot/daily.4/  mv /mnt/backup/rsnapshot/daily.2/ /mnt/backup/rsnapshot/daily.3/  mv /mnt/backup/rsnapshot/daily.1/ /mnt/backup/rsnapshot/daily.2/  native_cp_al("/mnt/backup/rsnapshot/daily.0", \ "/mnt/backup/rsnapshot/daily.1")  ---------------------------------------------------------------------------- rsnapshot encountered an error! The program was invoked with these options: /usr/bin/rsnapshot -v daily  ---------------------------------------------------------------------------- ERROR: Warning! "/mnt/backup/rsnapshot/daily.1/shuttle/etc/alternatives/Mail.1.gz" exists! ERROR: Warning! copy_symlink("/mnt/backup/rsnapshot/daily.0/shuttle/etc/alternatives/Mail.1.gz", "/mnt/backup/rsnapshot/daily.1/shuttle/etc/alternatives/Mail.1.gz") [-- snip! --] 

Der Twist

Der Spaß ist: Die Datei, die rsnapshot (oder cp -al) schwer macht, ist tatsächlich doppelt vorhanden! Schauen Sie sich die Inodes am Anfang der Zeile an. Hier ist die Ausgabe ls -liauf meiner Debian Box:

lennart@shuttle:~$ ls -li /mnt/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep -i mail 71047301 lrwxrwxrwx 1 root root 23 Oct 28 09:32 mail -> /usr/bin/heirloom-mailx 71047299 lrwxrwxrwx 1 root root 23 Oct 28 09:32 Mail -> /usr/bin/heirloom-mailx 71047302 lrwxrwxrwx 1 root root 39 Oct 28 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 71047300 lrwxrwxrwx 1 root root 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 71047300 lrwxrwxrwx 1 root root 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 71047303 lrwxrwxrwx 1 root root 23 Oct 28 09:32 mailx -> /usr/bin/heirloom-mailx 71047304 lrwxrwxrwx 1 root root 39 Oct 28 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 

Das gleiche wird ls -l1auf dem Server ausgeführt, der das Verzeichnis exportiert:

[~] # ls -li /share/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep -> 71047299 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 Mail -> /usr/bin/heirloom-mailx 71047300 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@ 71047301 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 mail -> /usr/bin/heirloom-mailx 71047302 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@ 71047303 lrwxrwxrwx 1 admin administ 23 Oct 28 09:32 mailx -> /usr/bin/heirloom-mailx 71047304 lrwxrwxrwx 1 admin administ 39 Oct 28 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz@ 

Die Frage

Hat jemand eine Idee, was das verursacht haben könnte und wie man es lösen könnte?

[edit 1]

das gleiche ls von einem Rechner, auf dem OS X 10.9 läuft:

thebook-wlan:~ lennart$ ls -li /Volumes/backup/rsnapshot/daily.0/shuttle/etc/alternatives/ |grep -i mail 71047299 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 Mail -> /usr/bin/heirloom-mailx 71047300 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 Mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 71047301 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 mail -> /usr/bin/heirloom-mailx 71047302 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 mail.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 71047303 lrwxrwxrwx 1 root wheel 23 28 Okt 09:32 mailx -> /usr/bin/heirloom-mailx 71047304 lrwxrwxrwx 1 root wheel 39 28 Okt 09:32 mailx.1.gz -> /usr/share/man/man1/heirloom-mailx.1.gz 

Nur meine Debian-Box scheint Probleme mit der Verzeichnisliste zu haben.

0
I actually have this exact same problem, except I `ls -li` shows everything to be completely normal for me. I've tried a bunch of different things, including remounting, blowing away the entire backup and starting again, etc. Did you ever solve it? Chris vor 10 Jahren 0

1 Antwort auf die Frage

-1
Wayneywoo

Ich habe genau das gleiche Problem mit nur einer Datei! Mein Problem war, dass diese bestimmte Datei sowohl in Kleinbuchstaben als auch in Großbuchstaben vorhanden war. Ich habe mein Problem gelöst, indem ich die gleichnamige Großbuchstabe kopiert habe, indem ich dem Dateinamen 2 hinzufügte:

xt_CONNMARK.ko (zweimal mit demselben Inode aufgeführt) in xt_CONNMARK2.ko kopiert

Jetzt wird xt_CONNMARK.ko einmal mit der neu kopierten Datei aufgelistet, xt_CONNMARK2.ko auch einmal!

Sehr sehr seltsames Verhalten aber gelöst?