<div dir="ltr"><div>Hi,<br><br>The mountpoints image file contents with <b>criu show -f</b> is as follows :<br><br><b>beproject@beproject:~$</b> criu show -f mountpoints-1<br>mountpoints-11.img mountpoints-12.img<br><br><b>beproject@beproject:~$</b> criu show -f mountpoints-11.img <br>fstype:
0 mnt_id: 0x20 root_dev: 0x1f00002 parent_mnt_id: 0x23 flags: 0x100406
root: "/" mountpoint: "/cache" source: "/dev/block/mtdblock2" options:
"data=ordered" shared_id: 0xc master_id: 0 <br>fstype: 0 mnt_id: 0x1f
root_dev: 0x1f00001 parent_mnt_id: 0x23 flags: 0x100406 root: "/"
mountpoint: "/data" source: "/dev/block/mtdblock1" options:
"data=ordered" shared_id: 0xb master_id: 0 <br>fstype: 0 mnt_id: 0x1e
root_dev: 0x1f00000 parent_mnt_id: 0x23 flags: 0x300001 root: "/"
mountpoint: "/system" source: "/dev/block/mtdblock0" options:
"data=ordered" shared_id: 0xa master_id: 0 <br>fstype: 0x5 mnt_id: 0x1d
root_dev: 0x12 parent_mnt_id: 0x23 flags: 0x300000 root: "/" mountpoint:
"/mnt/obb" source: "tmpfs" options: "mode=755,gid=1000" shared_id: 0x9
master_id: 0 <br>fstype: 0x5 mnt_id: 0x1c root_dev: 0x11 parent_mnt_id:
0x23 flags: 0x300000 root: "/" mountpoint: "/mnt/asec" source: "tmpfs"
options: "mode=755,gid=1000" shared_id: 0x8 master_id: 0 <br>fstype: 0x5
mnt_id: 0x1b root_dev: 0x10 parent_mnt_id: 0x25 flags: 0x300000 root:
"/" mountpoint: "/sys/fs/cgroup" source: "none" options:
"mode=750,gid=1000" shared_id: 0x5 master_id: 0 <br>fstype: 0xb mnt_id:
0x1a root_dev: 0x6 parent_mnt_id: 0x25 flags: 0x300000 root: "/"
mountpoint: "/sys/kernel/debug" source: "debugfs" options: "" shared_id:
0x4 master_id: 0 <br>fstype: 0x6 mnt_id: 0x27 root_dev: 0xa
parent_mnt_id: 0x26 flags: 0x300000 root: "/1" mountpoint:
"/dev/console" source: "devpts" options: "mode=600,ptmxmode=000"
shared_id: 0x7 master_id: 0 <br>fstype: 0 mnt_id: 0x26 root_dev: 0x2
parent_mnt_id: 0x23 flags: 0x300000 root: "/dev" mountpoint: "/dev"
source: "rootfs" options: "size=228184k,nr_inodes=57046" shared_id: 0x6
master_id: 0 <br>fstype: 0x2 mnt_id: 0x25 root_dev: 0xf parent_mnt_id:
0x23 flags: 0x300000 root: "/" mountpoint: "/sys" source: "none"
options: "" shared_id: 0x3 master_id: 0 <br>fstype: 0x1 mnt_id: 0x24
root_dev: 0xd parent_mnt_id: 0x23 flags: 0x300000 root: "/" mountpoint:
"/proc" source: "none" options: "" shared_id: 0x2 master_id: 0 <br>fstype:
0 mnt_id: 0x23 root_dev: 0xb300000 parent_mnt_id: 0x19 flags: 0x300000
root: "/A/rootfs" mountpoint: "/" source: "/dev/mmcblk0" options: ""
shared_id: 0x1 master_id: 0 <br><br><b>beproject@beproject:~$</b> criu show -f mountpoints-12.img <br>fstype:
0 mnt_id: 0x3a root_dev: 0x1f00002 parent_mnt_id: 0x2f flags: 0x80406
root: "/" mountpoint: "/cache" source: "/dev/block/mtdblock2" options:
"data=ordered" shared_id: 0 master_id: 0xc <br>fstype: 0 mnt_id: 0x39
root_dev: 0x1f00001 parent_mnt_id: 0x2f flags: 0x80406 root: "/"
mountpoint: "/data" source: "/dev/block/mtdblock1" options:
"data=ordered" shared_id: 0 master_id: 0xb <br>fstype: 0 mnt_id: 0x38
root_dev: 0x1f00000 parent_mnt_id: 0x2f flags: 0x280001 root: "/"
mountpoint: "/system" source: "/dev/block/mtdblock0" options:
"data=ordered" shared_id: 0 master_id: 0xa <br>fstype: 0x5 mnt_id: 0x37
root_dev: 0x12 parent_mnt_id: 0x2f flags: 0x280000 root: "/" mountpoint:
"/mnt/obb" source: "tmpfs" options: "mode=755,gid=1000" shared_id: 0
master_id: 0x9 <br>fstype: 0x5 mnt_id: 0x36 root_dev: 0x11
parent_mnt_id: 0x2f flags: 0x280000 root: "/" mountpoint: "/mnt/asec"
source: "tmpfs" options: "mode=755,gid=1000" shared_id: 0 master_id: 0x8
<br>fstype: 0x6 mnt_id: 0x35 root_dev: 0xa parent_mnt_id: 0x34 flags:
0x280000 root: "/1" mountpoint: "/dev/console" source: "devpts" options:
"mode=600,ptmxmode=000" shared_id: 0 master_id: 0x7 <br>fstype: 0
mnt_id: 0x34 root_dev: 0x2 parent_mnt_id: 0x2f flags: 0x280000 root:
"/dev" mountpoint: "/dev" source: "rootfs" options:
"size=228184k,nr_inodes=57046" shared_id: 0 master_id: 0x6 <br>fstype:
0x5 mnt_id: 0x33 root_dev: 0x10 parent_mnt_id: 0x31 flags: 0x280000
root: "/" mountpoint: "/sys/fs/cgroup" source: "none" options:
"mode=750,gid=1000" shared_id: 0 master_id: 0x5 <br>fstype: 0xb mnt_id:
0x32 root_dev: 0x6 parent_mnt_id: 0x31 flags: 0x280000 root: "/"
mountpoint: "/sys/kernel/debug" source: "debugfs" options: "" shared_id:
0 master_id: 0x4 <br>fstype: 0x2 mnt_id: 0x31 root_dev: 0xf
parent_mnt_id: 0x2f flags: 0x280000 root: "/" mountpoint: "/sys" source:
"none" options: "" shared_id: 0 master_id: 0x3 <br>fstype: 0x1 mnt_id:
0x30 root_dev: 0xd parent_mnt_id: 0x2f flags: 0x280000 root: "/"
mountpoint: "/proc" source: "none" options: "" shared_id: 0 master_id:
0x2 <br>fstype: 0 mnt_id: 0x2f root_dev: 0xb300000 parent_mnt_id: 0x2e
flags: 0x280000 root: "/A/rootfs" mountpoint: "/" source: "/dev/mmcblk0"
options: "" shared_id: 0 master_id: 0x1 <br><br><br></div><div>As my system lacks ip tools, so I had also skipped the ip related errors.<br></div><div>Also the log attached contains of messages like "[ vijay ] .... "<br></div><div> which are inserted by me, just for knowing the control flow.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 12:41 AM, Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/17/2015 09:54 PM, beproject criu wrote:<br>
> Hi,<br>
> I am trying to dump lxc container where container has external mount on /dev.<br>
> I have used --ext-mount-map /dev:dev while dumping. below is the full command used for dump.<br>
><br>
> #criu dump --root /usr/local/lib/lxc/rootfs/root --evasive-devices \<br>
> --tcp-established --ext-mount-map /dev:dev --file-locks -n net -n mnt \<br>
> -n ipc -n pid -vvvvvvvv -D data -o dump.log -t <pid><br>
<br>
</span>Can you check the mountpoints image file contents with criu show -f?<br>
<span class=""><br>
> I am trying to restore container using the following command,<br>
> #criu restore --root /home/nyc/A/rootfs/ --ext-mount-map dev:/dev -d -vvv -o restore.log<br>
<br>
</span>The -v4 produces more informative logs.<br>
<span class=""><br>
> But, while restore it is not able to see the external mounts.<br>
> I added the following message in mount.c=>validate_mounts,line no. 610.<br>
><br>
> if (!strncmp(m->mountpoint, "./dev", 5))<br>
> pr_info("%s mount on %s\n",m->fstype->name, m->mountpoint);<br>
><br>
> This printed a line "unsupported mount on ./dev" in restore.log<br>
<br>
</span>Did restore fail? With what message? Can you show the full restore.log file?<br>
<span class=""><br>
> What might be the reason for this?<br>
> Why is criu not able able to see external mounts?<br>
<br>
</span>If there's a message "Mounpoint ... will have root from ..." in logs,<br>
then the external mount was successfully resolved.<br>
<br>
Thanks,<br>
Pavel<br>
<br>
<br>
</blockquote></div><br></div>