[CRIU] problem migrating containers not on shared storage

Tycho Andersen tycho.andersen at canonical.com
Thu Sep 4 07:49:28 PDT 2014


On Thu, Sep 04, 2014 at 06:33:30PM +0400, Andrew Vagin wrote:
> On Thu, Sep 04, 2014 at 09:07:50AM -0500, Tycho Andersen wrote:
> > Hi all,
> > 
> > I'm trying to migrate containers across two vms using rsync to move
> > their filesystems across. I get the following error:
> > 
> > (00.140226)      1: Error (fsnotify.c:126): fsnotify: Can't open file handle for 0x0fd00001:0x0000000000180009: Stale file handle
> > 
> > This seems to be because criu is keeping around the inodes of the
> > files that were inotify_add_watch()ed, instead of the path names. Does
> > that sound right? Is there any reason we can't move it to keep the
> > pathnames instead and avoid this problem?
> > 
> > Also, it looks like there are some other inode related things in the
> > images. The one in fh.proto looks like it might cause similar
> > problems. Does anyone have any thoughts?
> 
> Look at the --force-irmap, it should solve your problem.

It does indeed, thanks for the quick response!

Tycho

> commit edde5fb46163c458798de7bff9485802880f1ea7
> Author: Pavel Emelyanov <xemul at parallels.com>
> Date:   Thu Mar 6 14:56:03 2014 +0400
> 
>     irmap: Add option that forces fsnotify watches paths resolve
>     
>     When migrating container with copying its FS, the inode numbers
>     and thus their handles wil change. This will make the restore of
>     inotify/fanotify fail, since they do it via fhandles.
>     
>     We've already faced the problems with fsnotifies on NFS -- they
>     don't work there. To address this an irmap cache is created on
>     pre-dump, so to resolve the issue with changed inodes during
>     migration, we can force the irmap cache build.
>     
>     Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> 
> 
> > 
> > Thanks,
> > 
> > Tycho
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list