X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q1MIVMRg041465 for ; Wed, 22 Feb 2012 12:31:22 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id 528B48F8040; Wed, 22 Feb 2012 10:31:22 -0800 (PST) Received: from [128.162.233.117] (augusta.americas.sgi.com [128.162.233.117]) by estes.americas.sgi.com (Postfix) with ESMTP id 475E870017A7; Wed, 22 Feb 2012 12:31:22 -0600 (CST) Message-ID: <4F45347A.2050204@sgi.com> Date: Wed, 22 Feb 2012 12:31:22 -0600 From: Bill Kendall User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 To: Tommy Wu Cc: xfs Subject: Re: xfsrestore will create orphanage directory when use -t References: <4F3EBDA6.7070108@sgi.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/17/2012 06:22 PM, Tommy Wu wrote: > 2012/2/18 Bill Kendall: >> 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:" I found an issue which is likely the same as what you're seeing. I'll post a patch shortly, please let me know whether or not it fixes the problem. Thanks, Bill