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
|