* usage pattern: xfsrestore to mirror disks
@ 2007-07-08 18:18 Jakob Praher
2007-07-09 5:03 ` Timothy Shimmin
0 siblings, 1 reply; 4+ messages in thread
From: Jakob Praher @ 2007-07-08 18:18 UTC (permalink / raw)
To: linux-xfs
hi all,
first of all: I am a very happy user of xfs for a long time now.
I use xfs in tandem with lvm2 and I have to say I am very pleased.
Now a question:
There are two modes of using xfs(dump,restore): non-cumulative and
cumulative. Is this cumulative mode also good to work with full dumps
(level0). E.g. the data I have to mirror is not large, and I don't want
to rely on inventory data. So I want for instance if between two full
dumps a file F was deleted, it should get deleted when I do xfsrestore
for the second time.
I don't keep the xfsdump output files but i just apply them via ssh. So
something like that would be great!
Maybe someone can shed some light on that.
thanks
--Jakob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usage pattern: xfsrestore to mirror disks
2007-07-08 18:18 usage pattern: xfsrestore to mirror disks Jakob Praher
@ 2007-07-09 5:03 ` Timothy Shimmin
2007-07-10 19:24 ` Jakob Praher
0 siblings, 1 reply; 4+ messages in thread
From: Timothy Shimmin @ 2007-07-09 5:03 UTC (permalink / raw)
To: Jakob Praher; +Cc: linux-xfs
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
Hi Jakob,
Jakob Praher wrote:
> hi all,
>
> first of all: I am a very happy user of xfs for a long time now.
> I use xfs in tandem with lvm2 and I have to say I am very pleased.
>
> Now a question:
>
> There are two modes of using xfs(dump,restore): non-cumulative and
> cumulative. Is this cumulative mode also good to work with full dumps
> (level0). E.g. the data I have to mirror is not large, and I don't want
> to rely on inventory data. So I want for instance if between two full
> dumps a file F was deleted, it should get deleted when I do xfsrestore
> for the second time.
>
> I don't keep the xfsdump output files but i just apply them via ssh. So
> something like that would be great!
>
> Maybe someone can shed some light on that.
>
The cumulative mode really only relates to restore and not xfsdump.
xfsrestore in cumulative mode keeps its version of the directory tree
around (restoredir/xfsrestorehousekeepingdir/tree) so that it can use
it to compare with and decide if directory entries have been renamed,
deleted etc.. The code has been written to do this given an initial
level 0 dump and then delta dumps (incremental or resumed).
If you try to use a 2nd level 0 dump on restore then it will fail to
work - it won't restore anything.
It fails in xfsdump/restore/content.c/dumpcompat() when it
compares the restores uuid from persp->a.lastdumpid with the
incremental's uuid stored in scrhdrp->cih_last_id (and for a full
dump the cih_last_id won't be set).
Unfortunatly, a flag is set in restore so that it stops it from reporting
this error (not sure why).
I tried circumventing this uuid check (see the patch) and things
seemed to work ok (it did the renames and deletes).
However, I'm uncertain of any other repercussions - it's been a while
since I looked at cumulative restores. Maybe others might know.
I wonder if other tools might be useful to you... xfscopy,...?
--Tim
[-- Attachment #2: restore_hack.patch --]
[-- Type: text/plain, Size: 836 bytes --]
===========================================================================
Index: xfsdump/restore/content.c
===========================================================================
--- a/xfsdump/restore/content.c 2007-07-09 14:41:15.000000000 +1000
+++ b/xfsdump/restore/content.c 2007-07-09 14:36:54.000000000 +1000
@@ -2019,7 +2019,7 @@ content_stream_restore( ix_t thrdix )
} else if ( dumpcompat( resumepr,
level,
*baseidp,
- BOOL_FALSE )) {
+ BOOL_TRUE )) {
if ( uuid_compare( lastdumprejectedid,
grhdrp->gh_dumpid) == 0) {
matchpr = BOOL_FALSE;
@@ -6762,7 +6762,7 @@ dumpcompat( bool_t resumepr, ix_t level,
"selected dump not based on "
"previously applied dump\n"));
}
- return BOOL_FALSE;
+ /*return BOOL_FALSE;*/ return BOOL_TRUE;
}
}
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usage pattern: xfsrestore to mirror disks
2007-07-09 5:03 ` Timothy Shimmin
@ 2007-07-10 19:24 ` Jakob Praher
2007-07-10 20:13 ` Bill Kendall
0 siblings, 1 reply; 4+ messages in thread
From: Jakob Praher @ 2007-07-10 19:24 UTC (permalink / raw)
To: linux-xfs
Hi Timothy,
thanks for your quick response.
I will apply your patch and try it out.
Timothy Shimmin wrote:
> Hi Jakob,
>
> I wonder if other tools might be useful to you... xfscopy,...?
>
that would be very interesting for me.
-- Jakob
> --Tim
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: usage pattern: xfsrestore to mirror disks
2007-07-10 19:24 ` Jakob Praher
@ 2007-07-10 20:13 ` Bill Kendall
0 siblings, 0 replies; 4+ messages in thread
From: Bill Kendall @ 2007-07-10 20:13 UTC (permalink / raw)
To: Jakob Praher; +Cc: linux-xfs
Hi Jakob,
If I'm understanding your issue correctly, it sounds like rsync would be
a good tool for your needs. Or is there some reason you're not using
rsync?
Bill
On 07/10/2007 02:24 PM, Jakob Praher wrote:
> Hi Timothy,
>
> thanks for your quick response.
> I will apply your patch and try it out.
>
> Timothy Shimmin wrote:
>> Hi Jakob,
>>
>> I wonder if other tools might be useful to you... xfscopy,...?
>>
> that would be very interesting for me.
>
> -- Jakob
>> --Tim
>>
>>
>
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-10 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-08 18:18 usage pattern: xfsrestore to mirror disks Jakob Praher
2007-07-09 5:03 ` Timothy Shimmin
2007-07-10 19:24 ` Jakob Praher
2007-07-10 20:13 ` Bill Kendall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox