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

Pavel Emelyanov xemul at parallels.com
Tue Jun 24 09:58:36 PDT 2014


On 06/24/2014 08:55 PM, Serge Hallyn wrote:
> 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. 

Then it's not external bind mount, but internal one. And we have a bug
detecting one :(

> 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.

Well, it is :) The --ext-mount-map is to bind mount from the host, which
just not our case.

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

Thanks :)




More information about the CRIU mailing list