xfs
[Top] [All Lists]

Re: Bug (?) : cumulative xfsrestore does not restore files and folders i

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: Bug (?) : cumulative xfsrestore does not restore files and folders in a directory which was renamed
From: Damien Gombault <damien.gombault@xxxxxxxx>
Date: Fri, 24 Jun 2016 15:51:57 +0200
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160623014217.GZ12670@dastard>
Organization: GIP Recia
References: <a08ae222-7654-4a6f-d9ba-f70017784f74@xxxxxxxx> <20160622220959.GV12670@dastard> <20160622222328.GW12670@dastard> <20160623014217.GZ12670@dastard>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
Hi.

Thank you for the patch.

The patch fixes simple cases (like my reproducer) but it does not fix
restoration of more complex directory structures : I have tested the patch on my real data, it fixes some but not all warnings (a user renamed/moved a lots of
files and directory between the 2 dumps).

Here is another testcase which fails (with the patch) :

mkdir dira
mkdir dira/dirc
touch dira/dirc/filea
mkdir dirb

.
âââ dira
â   âââ dirc
â       âââ filea
âââ dirb

Make a level 0 dump.

mv dirb dira/dirB
mv dira/dirc/ dira/dirB/dirC
touch dira/dirB/dirC/fileb

.
âââ dira
    âââ dirB
        âââ dirC
            âââ filea
            âââ fileb

Make a level 1 dump.

Restore level 0 then level 1 dump, you will get :

xfsrestore: directory post-processing
xfsrestore: WARNING: unable to set secure extended attribute for dira/dirB: No
such file or directory (2)
xfsrestore: restoring non-directory files
xfsrestore: WARNING: open of dira/dirB/dirC/fileb failed: No such file or
directory: discarding ino 524386
xfsrestore: WARNING: unable to set secure extended attribute for
dira/dirB/dirC/fileb: No such file or directory (2)
xfsrestore: WARNING: path_to_handle of dira/dirB/dirC failed:No such file or
directory
xfsrestore: could not set access and modification times of dira/dirB/dirC: No
such file or directory
xfsrestore: chown (uid=0, gid=0) dira/dirB/dirC failed: No such file or
directory
xfsrestore: chmod dira/dirB/dirC failed: No such file or directory
xfsrestore: WARNING: attempt to set extended attributes (xflags 0x80000000,
extsize = 0x0, projid = 0x0) of dira/dirB/dirC failed: Bad file descriptor
xfsrestore: WARNING: path_to_handle of dira/dirB failed:No such file or
directory
xfsrestore: could not set access and modification times of dira/dirB: No such
file or directory
xfsrestore: chown (uid=0, gid=0) dira/dirB failed: No such file or directory
xfsrestore: chmod dira/dirB failed: No such file or directory
xfsrestore: WARNING: attempt to set extended attributes (xflags 0x80000000,
extsize = 0x0, projid = 0x0) of dira/dirB failed: Bad file descriptor
xfsrestore: WARNING: unable to rmdir /mnt/test//orphanage: Directory not empty

Directory dirB is placed in orphanage folder and fileb is not restored :

.
âââ dira
âââ orphanage
â   âââ 1069152.734839917
â       âââ dirC
â           âââ filea
âââ xfsrestorehousekeepingdir
    âââ dirattr
    âââ dirextattr
    âââ namreg
    âââ state
    âââ tree

--
Damien Gombault

Le 23/06/2016 Ã 03:42, Dave Chinner a Ãcrit :
On Thu, Jun 23, 2016 at 08:23:28AM +1000, Dave Chinner wrote:
On Thu, Jun 23, 2016 at 08:09:59AM +1000, Dave Chinner wrote:
But it seems that dirb hasn't been created before the file in it
is being restored. THis can happen because the inventory is not
correct, whichmay in fact be a problem with dump rather than
restore...

I'll have a bit of a play around here, see if I can reproduce it.
Yes, i can reproduce it, so I'll have a deeper look.
Can you try this patch?

-Dave

Attachment: damien_gombault.vcf
Description: Vcard

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