xfs
[Top] [All Lists]

Re: xfsrestore will create orphanage directory when use -t

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: xfsrestore will create orphanage directory when use -t
From: Tommy Wu <wu.tommy@xxxxxxxxx>
Date: Sat, 18 Feb 2012 08:34:56 +0800
Authentication-results: mr.google.com; spf=pass (google.com: domain of wu.tommy@xxxxxxxxx designates 10.112.48.36 as permitted sender) smtp.mail=wu.tommy@xxxxxxxxx; dkim=pass header.i=wu.tommy@xxxxxxxxx
Cc: xfs <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oW4N476g0ATT6hFGAEXfGI8R3bRUo94M9C6glMLnRCY=; b=LbRmn1shH8xY9xDKFtQ9LTzF6UE29LP+X9x3DUpUOB8wD0/61Dsq3bpd9lrGCmGeZl GU9F5X1cxJB6vAbNrIbIxojNnLrn9Hvc8hIEESBit8/S0TY01cuzktWUHIwGkwf0OgFV I/L7GNDJcueWjDtK02debaioHspJKVNg620aU=
In-reply-to: <CAGdb-8eMcBghwznGbGQha01paF1L+MdB3QsxHCuCh6ZOW=wsag@xxxxxxxxxxxxxx>
References: <CAGdb-8fC4-3swyyfP3xO=camgzDjR5GYV3qoaB1w+xAfiNeYPw@xxxxxxxxxxxxxx> <4F3EBDA6.7070108@xxxxxxx> <CAGdb-8eMcBghwznGbGQha01paF1L+MdB3QsxHCuCh6ZOW=wsag@xxxxxxxxxxxxxx>
2012/2/18 Tommy Wu <wu.tommy@xxxxxxxxx>:
> 2012/2/18 Bill Kendall <wkendall@xxxxxxx>:
>> On 02/14/2012 11:21 AM, Tommy Wu wrote:
>>>
>>> from the xfsdump man page:
>>> xfsrestore also generates a directory named orphanage in the dest
>>> directory. xfsrestore removes this directory after completing a simple
>>> restore. However, if orphanage is not empty, it is not removed. This
>>> can happen if files present on the dump media are not referenced by
>>> any of the restored directories. The orphanage has an entry for each
>>> such file. The entry name is the file's original inode number, a ".",
>>> and the file's generation count modulo 4096 (only the lower 12 bits of
>>> the generation count are used).
>>>
>>> and the -t option from xfsdump man page:
>>> Displays the contents of the dump, but does not create or modify any
>>> files or directories. It may be desirable to set the verbosity level
>>> to silent when using this option.
>>>
>>> But when we use -t option with xfsrestore, it still create orphanage
>>> directory in current directory (because no dest directory assign).
>>> and if it's not empty, it is not removed.
>>>
>>> This is a bug or it's a feature?
>>
>>
>> I can see code where this would happen, except that it would appear
>> to require both -r and -t to be used, and xfsrestore doesn't allow
>> that.
>>
>> If you send the command line you used I can take another look.
>>
>> Bill
>
> here is the command I used for -t:
> cat var.xfsdump.gz | gzip -dqv | xfsrestore -v silent -p 300 -J -t - |
> grep "^xfsrestore:"
>
> I also test it with only -t option, it also create orphanage folder
> for such dump file (not all dump file has this issue)
> cat var.xfsdump.gz | gzip -dqv | xfsrestore -t - | grep "^xfsrestore:"
>
>
> --
>
> Tommy Wu

I use xfsdump 3.0.6 plus following 2 patch:
[PATCH] xfsdump: allow system() to obtain exit status
[PATCH] xfsdump: handle files with no extent headers

-- 

Tommy Wu

<Prev in Thread] Current Thread [Next in Thread>