[CRIU] [PATCH 2/2] mkdir -p any dirs necessary for files

Serge Hallyn serge.hallyn at ubuntu.com
Tue Jun 24 09:55:52 PDT 2014


Quoting Pavel Emelyanov (xemul at parallels.com):
> On 06/24/2014 05:34 PM, Tycho Andersen wrote:
> > Hi Pavel,
> > 
> > On Tue, Jun 24, 2014 at 04:09:32PM +0400, Pavel Emelyanov wrote:
> >> On 06/24/2014 12:28 PM, Andrew Vagin wrote:
> >>> 1480 1470 0:12 /8 /dev/lxc/tty4 rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=000
> >>>
> >>> Looks like an external bind-mount.
> >>
> >> Then why wasn't it detected as such? Tycho, can you try to check the same
> >> on 1.3-rc2, we have fixed several issues regarding bind mounts detection in there.
> > 
> > When I rebase on top of the current git master I get:
> > 
> > (00.209507)      1: Error (mount.c:449): 59:./dev/ptmx doesn't have a proper root mount
> > 
> > Perhaps a step closer? Not sure exactly what this means.
> 
> Yes, this is what we expected. The message means, that the /dev/ptmx is
> a bindmount mountpoint whose root (the source file) sits outside of the
> container FS tree.
> 
> You can check what the source is by looking at /proc/pid/mountinfo from
> the host. To dump and restore such mount points we have the --ext-mount-map
> option (http://criu.org/External_bind_mounts), so you should inform criu 
> about such. If you need more info -- feel free to ask.

Hi,

actually this doesn't quite work for the ptmx, or at least I don't know how to
make it work.

/dev/ptmx is bind-mounted from /dev/pts/ptmx in the container itself.  So if I
add --ext-mount-map /dev/ptmx:ptmxmount to the dump command and
--ext-mount-map ptmxmount:/dev/pts/ptmx to the restore command, it tries to
mount /dev/pts/ptmx from the host, which isn't right.

So really this is not an external mount, it looks like criu is just not quite
figuring out the source.  I'll keep digging...

-serge


More information about the CRIU mailing list