xfs
[Top] [All Lists]

Re: xfsrestore over ssh?

To: Nathan Scott <nscott@xxxxxxxxxx>
Subject: Re: xfsrestore over ssh?
From: Timothy Shimmin <tes@xxxxxxx>
Date: Tue, 22 Jul 2008 17:04:22 +1000
Cc: Richard Hartmann <richih.mailinglist@xxxxxxxxx>, Bill Kendall <wkendall@xxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <1216708397.4499.57.camel@xxxxxxxxxxxxxxxxxx>
References: <2d460de70807211317m75bc236y403d8fa57514262e@xxxxxxxxxxxxxx> <4884F2A5.5050507@xxxxxxx> <2d460de70807212002k1a95706ic8291e2abd8796b8@xxxxxxxxxxxxxx> <48855B16.4050208@xxxxxxx> <1216708397.4499.57.camel@xxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)
Nathan Scott wrote:
> On Tue, 2008-07-22 at 13:59 +1000, Timothy Shimmin wrote:
>> Richard Hartmann wrote:
>>> On Mon, Jul 21, 2008 at 22:33, Bill Kendall <wkendall@xxxxxxx wrote:
>> xfsrestore: unable to construct a file system handle for /mnt/sda3:
>>> Das Argument ist ung�ltig
>>> xfsrestore: Restore Status: ERROR
> 
> "unable to construct a file system handle" - theres only one place
> in the restore code that can come from - the path_to_fshandle call.
> Is there a 32 bit userspace and 64 bit kernel on the machine where
> xfsrestore is running?
> 
> Its not clear to me what that code in xfsrestore is trying to do,
> you may be able to just comment it out...?!?
> 
> cheers.
> 
> --
> Nathan
> 

Oh yeah from this code:
>         /* effectively initialize libhandle on this filesystem by
>          * allocating a file system handle. this needs to be done
>          * before any open_by_handle() calls (and possibly other
>          * libhandle calls).
>          */
>         if ( persp->a.dstdirisxfspr ) {
>                 void    *fshanp;
>                 size_t  fshlen=0;
> 
>                 if(path_to_fshandle(persp->a.dstdir, &fshanp, &fshlen)) {
>                         mlog( MLOG_NORMAL,
>                                 _("unable to construct a file "
>                                   "system handle for %s: %s\n"),
>                                 persp->a.dstdir,
>                                 strerror( errno ));

IIRC, I think it wants an fd to use for the filesystem in
handle ioctl calls. It caches it against the fsid in the handle.

I don't think commenting out will work as it will stop the handle
calls from working.

If you could strace it then we could see what call was failing
in path_to_fshandle().

path_to_fshandle...
>         fd = open(path, O_RDONLY);
>         if (fd < 0)
>                 return -1;
>         
>         obj.path = path;
>         result = obj_to_handle(path, fd, XFS_IOC_PATH_TO_FSHANDLE,
>                                 obj, fshanp, fshlen);
>         if (result < 0) {
>                 close(fd);
>                 return result;

So I guess either open failed or obj_to_handle failed.

obj_to_handle...
>                 hreq.path    = obj.path;
>         }
> 
>         hreq.oflags   = O_LARGEFILE;
>         hreq.ihandle  = NULL;
>         hreq.ihandlen = 0;
>         hreq.ohandle  = hbuf;
>         hreq.ohandlen = &handlen;
> 
>         ret = xfsctl(fspath, fsfd, opcode, &hreq);
>         if (ret)
>                 return ret;

--Tim


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