[CRIU] Dumping a FUSE mount

Pavel Emelyanov xemul at parallels.com
Thu Oct 8 03:12:51 PDT 2015


On 10/08/2015 01:25 AM, Jonathan 'Wolf' Rentzsch wrote:
>> On Oct 1, 2015, at 4:23 AM,Pavel Emelyanov <xemul at parallels.com> wrote:
>> 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, I went with your recommended second option.
> 
> I commented-out the validate_mounts() code as suggested, and was then able to dump. Yay.
> 
> However I’m not abel to successfully restore. do_mount_one() ends up calling do_new_mount(), which fails with 
> 
> 1: Error (mount.c:1480): Can't mount at ./app/available_modules: No such device

Heh... Why does it do so? If the mountpoint in question is external from the
do_mount_one() it should go into do_bind_mount(). Do you specify the --ext-mount-map
option at restore?

> I put in some logging and it’s calling
> 
> mount(“dupe”, "./app/available_modules”, “unsupported”, 0x200001, "user_id=0,group_id=0”)
> 
> “dupe" is the name of the external fuse process.
> 
> I tried detecting the “dupe” source argument and dynamically switching mount()’s filesystemtype
> arg from “unsupported” to “fuse”, as http://fuse.sourceforge.net/doxygen/ seems to suggest, but
> that just yields an "Invalid argument” error instead.
> 
> Any suggestions about how to get mount restoration working with an external fuse?
> 
> Note: We’re currently using criu version 1.5.2 in production.

-- Pavel



More information about the CRIU mailing list