Bug (?) : cumulative xfsrestore does not restore files and folders in a directory which was renamed
Damien Gombault
damien.gombault at recia.fr
Fri Jun 24 08:51:57 CDT 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: damien_gombault.vcf
Type: text/x-vcard
Size: 437 bytes
Desc: not available
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20160624/fa55ee26/attachment.vcf>
More information about the xfs
mailing list