public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Shimmin <tes@sgi.com>
To: Nathan Scott <nscott@aconex.com>
Cc: Richard Hartmann <richih.mailinglist@gmail.com>,
	Bill Kendall <wkendall@sgi.com>,
	xfs@oss.sgi.com
Subject: Re: xfsrestore over ssh?
Date: Tue, 22 Jul 2008 17:04:22 +1000	[thread overview]
Message-ID: <48858676.3030105@sgi.com> (raw)
In-Reply-To: <1216708397.4499.57.camel@verge.scott.net.au>

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@sgi.com 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

  reply	other threads:[~2008-07-22  7:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 20:17 xfsrestore over ssh? Richard Hartmann
2008-07-21 20:33 ` Bill Kendall
2008-07-22  3:02   ` Richard Hartmann
2008-07-22  3:59     ` Timothy Shimmin
2008-07-22  4:43       ` Richard Hartmann
2008-07-22  6:20         ` Donald Douwsma
2008-07-22 10:40           ` Richard Hartmann
2008-07-22  6:33       ` Nathan Scott
2008-07-22  7:04         ` Timothy Shimmin [this message]
2008-07-22 10:51           ` Richard Hartmann
2008-07-22 10:52             ` Richard Hartmann
2008-07-23  0:19             ` Timothy Shimmin
2008-07-23 11:39               ` Richard Hartmann
2008-07-22 10:45         ` Richard Hartmann
2008-07-22 10:49           ` Richard Hartmann
2008-07-22 12:00             ` Richard Hartmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48858676.3030105@sgi.com \
    --to=tes@sgi.com \
    --cc=nscott@aconex.com \
    --cc=richih.mailinglist@gmail.com \
    --cc=wkendall@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox