[CRIU] Dumping a FUSE mount

Pavel Emelyanov xemul at parallels.com
Thu Oct 1 04:23:32 PDT 2015


On 09/30/2015 06:58 PM, Ross Boucher wrote:
> Hey everyone,
> 
> I want to checkpoint a container that has a mount backed by a FUSE filesystem. Trying 
> this naively doesn't work:
> 
> Error (mount.c:595): FS mnt ./app/available_modules dev 0x118 root / unsupported id 298
> 
> There's a page on the wiki promising instructions, but it's blank:
> http://criu.org/FUSE

It is :( We collect all we plan to write in the "Empty articles" category.

> I don't want to checkpoint the actual FUSE process, it runs externally to the container,
> and the directory is mounted readonly. Any suggestions?

Well, yes, this seem to be quite simple case. Patching is required, but still
we can handle it. There are two ways we can go with it.

First is to use the --skip-mnt option telling criu to ignore one. Then at
restore time it will be unavailable and even if you mount one in advance
before calling restore, the latter would demolish one with pivot_root :(
So we'll need to patch criu to support --skip-mnt restore time (treating 
it as --keep-mnt-at-its-original-location).

Second option is to mark this thing with the --ext-mount-map flag thus
telling criu to put only the mountpoint info into images on dump and pull
them back on restore. The only problem here is that validate_mounts()
only supports non-root mounts as external:

                if (fsroot_mounted(m)) {
                        if (m->fstype->code == FSTYPE__UNSUPPORTED) {
                                pr_err("FS mnt %s dev %#x root %s unsupported id %d\n",
                                                m->mountpoint, m->s_dev, m->root, m->mnt_id);
                                return -1;
                        }
                } else if (!m->external) {
			...

So the if branch will have to be patched to allow for external root mount.

>From my perspective the 2nd way is better.

-- Pavel



More information about the CRIU mailing list