[CRIU] CRIU unable to see external mounts while restore

beproject criu beprojectcriu at gmail.com
Wed Feb 18 09:17:05 PST 2015


Hi,

The mountpoints image file contents with *criu show -f* is as follows :

*beproject at beproject:~$* criu show -f mountpoints-1
mountpoints-11.img  mountpoints-12.img

*beproject at beproject:~$* criu show -f mountpoints-11.img
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
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
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
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
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
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
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
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
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
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
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
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

*beproject at beproject:~$* criu show -f mountpoints-12.img
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
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
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
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
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
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
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
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
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
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
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
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


As my system lacks ip tools, so I had also skipped the ip related errors.
Also the log attached contains of messages like "[ vijay ] .... "
 which are inserted by me, just for knowing the control flow.


On Wed, Feb 18, 2015 at 12:41 AM, Pavel Emelyanov <xemul at parallels.com>
wrote:

> On 02/17/2015 09:54 PM, beproject criu wrote:
> > Hi,
> > I am trying to dump lxc container where container has external mount on
> /dev.
> > I have used --ext-mount-map /dev:dev while dumping. below is the full
> command used for dump.
> >
> > #criu dump --root /usr/local/lib/lxc/rootfs/root --evasive-devices \
> > --tcp-established --ext-mount-map /dev:dev --file-locks -n net -n mnt \
> > -n ipc -n pid -vvvvvvvv -D data -o dump.log -t <pid>
>
> Can you check the mountpoints image file contents with criu show -f?
>
> > I am trying to restore container using the following command,
> > #criu restore --root /home/nyc/A/rootfs/ --ext-mount-map dev:/dev -d
> -vvv -o restore.log
>
> The -v4 produces more informative logs.
>
> > But, while restore it is not able to see the external mounts.
> > I added the following message in mount.c=>validate_mounts,line no. 610.
> >
> >  if (!strncmp(m->mountpoint, "./dev", 5))
> >     pr_info("%s mount on %s\n",m->fstype->name, m->mountpoint);
> >
> > This printed a line "unsupported mount on ./dev" in restore.log
>
> Did restore fail? With what message? Can you show the full restore.log
> file?
>
> > What might be the reason for this?
> > Why is criu not able able to see external mounts?
>
> If there's a message "Mounpoint ... will have root from ..." in logs,
> then the external mount was successfully resolved.
>
> Thanks,
> Pavel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150218/991bcf0c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restore.log
Type: text/x-log
Size: 9665 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150218/991bcf0c/attachment-0001.bin>


More information about the CRIU mailing list