Hi Timothy,
> You've had a few xfsdump/xfsrestore emails of late :)
"No one cares if you can back up - only if you can recover.?" (W. Curtis
Preston, Unix Backup & Recovery, O'Reilly, 1999, xiv)
> > xfsrestore.debug.3 told me xfsrestore had deleted user/be/Sent/xy/290.:
> >
> > [...]
> > /usr/sbin/xfsrestore: rename nondir user/be/Sent/xy/290. to
> > orphanage/9074670.1
> > /usr/sbin/xfsrestore: unlink nondir orphanage/9074670.1
> > [...]
> > /usr/sbin/xfsrestore: restoring user/be/Sent/xy/291. (9074676 0)
> > /usr/sbin/xfsrestore: restoring regular file ino 9074676
> > user/be/Sent/xy/291.
> > /usr/sbin/xfsrestore: truncating user/be/Sent/xy/291. from 0 to 775
> > /usr/sbin/xfsrestore: restore complete: 76 seconds elapsed
> >
> > What's going on here? I'm using xfsdump-1.0.9-0.
>
> It looks like that this is happening in the function
> xfsdump/restore/tree.c/proc_hardlinks_cb().
> I'm not sure what this code is trying to do !
> However, I'll post a bug on this at SGI and
> look into it further.
> Thanks for the report.
I just investigated it a little further. I did another cumulative
restore of /var/spool/imap (based on level 0 on 2001-07-12). This time
I'm using xfsdump-1.0.11-0.
(/usr/sbin/amrestore -p $TAPE ente imap | /usr/sbin/xfsrestore -r -v
trace - .) > xfsrestore.debug.0
(/usr/sbin/amrestore -p $TAPE ente imap | /usr/sbin/xfsrestore -r -v
trace - .) > xfsrestore.debug.1
(/usr/sbin/amrestore -p $TAPE ente imap | /usr/sbin/xfsrestore -r -v
trace - .) > xfsrestore.debug.2
(/usr/sbin/amrestore -p $TAPE ente imap | /usr/sbin/xfsrestore -r -v
trace - .) > xfsrestore.debug.3
(/usr/sbin/amrestore -p $TAPE ente imap | /usr/sbin/xfsrestore -r -v
trace - .) > xfsrestore.debug.4
One of the files missing after the complete restore is user/ap/in/52.
xfsrestore told me it was deleted applying level 2:
# grep user/ap/in/52. xfsrestore.debug.?
xfsrestore.debug.0:/usr/sbin/xfsrestore: link user/ap/in/MKSports/21. to
user/ap/in/52. (4504894 0)
xfsrestore.debug.0:/usr/sbin/xfsrestore: linking user/ap/in/MKSports/21.
to user/ap/in/52.
xfsrestore.debug.2:/usr/sbin/xfsrestore: unlink user/ap/in/52.
But it's still there in /var/spool/imap (where the dump was taken from):
# ls -li /var/spool/imap/user/ap/in/52.
4504894 -rw------- 2 cyrus root 5464 Apr 13 14:12
/var/spool/imap/user/ap/in/52.
So it has a hardlink to it. What's the other filename pointing to the
inode 4504894?
# find /var/spool/imap/user/ap -inum 4504894 -ls
4504894 8 -rw------- 2 cyrus root 5464 Apr 13 14:12
/var/spool/imap/user/ap/in/MKSports/21.
4504894 8 -rw------- 2 cyrus root 5464 Apr 13 14:12
/var/spool/imap/user/ap/in/52.
In the restored tree, there's only user/ap/in/MKSports/21.:
# ll user/ap/in/MKSports/21.
-rw------- 1 cyrus root 5464 Apr 13 14:12
user/ap/in/MKSports/21.
No other link to it.
This file was restored in level 0, too:
# grep user/ap/in/MKSports/21. xfsrestore.debug.?
xfsrestore.debug.0:/usr/sbin/xfsrestore: restoring
user/ap/in/MKSports/21. (4504894 0)
xfsrestore.debug.0:/usr/sbin/xfsrestore: restoring regular file ino
4504894 user/ap/in/MKSports/21.
xfsrestore.debug.0:/usr/sbin/xfsrestore: truncating
user/ap/in/MKSports/21. from 0 to 5464
xfsrestore.debug.0:/usr/sbin/xfsrestore: link user/ap/in/MKSports/21. to
user/ap/in/52. (4504894 0)
xfsrestore.debug.0:/usr/sbin/xfsrestore: linking user/ap/in/MKSports/21.
to user/ap/in/52.
Ok, let's grep some more...
# grep -n "unlink " /usr/src/linux-2.4-xfs/cmd/xfsdump/restore/*
/usr/src/linux-2.4-xfs/cmd/xfsdump/restore/tree.c:1442:
"unlink %s\n",
(CVS checkout of this morning)
This line is in the function noref_elim_recurse (line 1181 in tree.c)
and there's a comment after the else in line 1330:
/* determine if we can unlink this node.
* if its not real, and not refed, simple.
* if real and not refed and there is at least
* one unreal refed node and no other real
* nodes around, must put this one in orphanage
* rather than unlinking it.
*/
So, what's an unreal node? And a node not referred to?
Maybe this lost link user/ap/in/52. was not referred to in the level 0
dump? Who's doing the mess? xfsdump not referring to or telling
xfsrestore of unreal nodes? Or does xfsrestore get things wrong?
|