Problem with symlinks and inodes

Discussion in 'Linux Virtual Machine' started by NavidA, Apr 16, 2017.

  1. NavidA

    NavidA Bit poster

    Messages:
    4
    Hi,
    I run Lubuntu inside Parallels. Lubuntu is used as a build environment for a software project. During the build process, a lot of temp and cached files are generated. When I copy the project files into Lubuntu and build it, it works just fine. But the ideal development setup for me is to keep the project files on Mac and symlink from from the build directory inside Lubuntu to project files through the Parallels Shared folder. When I do this and start the build process, at one point it throws the following error:
    WARNING: The free inode of /media/psf/Home/....../tmp (Home) is running low (4.000K left)
    ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
    WARNING: The free inode of /media/psf/Home/....../downloads (Home) is running low (4.000K left)
    ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!
    WARNING: The free inode of /media/psf/Home/....../sstate-cache (Home) is running low (4.000K left)
    ERROR: No new tasks can be executed since the disk space monitor action is "STOPTASKS"!


    I suspect that it has to do with inode settings in Parallels, as OSX partition is HFS+ which, as far as I read, does not have inodes limitations. My questions:
    1- Is it possible to increase inode limits in Parallels? If so, how?
    2- Could the problem be due to another reason that I can't see from above errors?

    Thanks in advance.
     
  2. rkulikov

    rkulikov Parallels Developers

    Messages:
    313
    Unfortunately current Shared Folders implementation for Linux guest has hardcoded inode limit set to 4096. The only way to workaround it at the moment is to manually adjust limit value in kernel module code. If you wish I may post rough instructions here.
     
  3. NavidA

    NavidA Bit poster

    Messages:
    4
    It'd be great if you could share the instructions with me here.
    Thanks.
     
  4. rkulikov

    rkulikov Parallels Developers

    Messages:
    313
    0. Go to PTfL kernel modules source code:
    $ pushd /usr/src/parallels-tools-<your_version_here>/prl_fs/SharedFolders/Guest/Linux/prl_fs

    1. Edit prl_fs module as a root in preferred text editor:
    $ sudo vim super.c

    2. Find line "buf->f_files = buf->f_ffree = 4096;" and adjust value 4096 to something more than required inode limit.

    3. Rebuild prl_fs:
    $ pushd ../../../../../ && sudo make -f Makefile.kmods

    4. Copy rebuilt module to target directory:
    $ sudo cp prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko /lib/modules/$(uname -r)/updates/dkms/

    5. Unmount Shared Folders:
    $ sudo prlfsmountd -u

    6. Reload prl_fs module:
    $ sudo rmmod prl_fs && sudo modprobe prl_fs

    7. Finally mount Shared Folders again:
    $ sudo prlfsmountd -f

    Yes. This is complex. And I have no guarantee that this works ok and brakes nothing. Moreover Tools update will discard all made changes. So you may want to disable Tools automatic update for this virtual machine.
     
  5. NavidA

    NavidA Bit poster

    Messages:
    4
    Thank for the instructions. I will try them and write the results in here.
    How can I disable Tools automatic update?
     
  6. 'dipoM

    'dipoM Bit poster

    Messages:
    1
    Thanks for sharing this. Had a similar issue on CentOS and the steps worked fine. Only difference was the dkms modules path.

    Code:
    sudo cp prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko /lib/modules/$(uname -r)/extra/
     

Share This Page