kernel module fuse for lxc

Discussion in 'Proxmox VE: Installation and configuration' started by RobFantini, Nov 26, 2015.

  1. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    Hello,
    I'm trying to setup an x2go server in a lxc.

    For remote printing kernel module 'fuse' is needed.

    So I tried to load the module at pve host, however the module is not avail:
    Code:
    modinfo fuse
    modinfo: ERROR: Module fuse not found.
    
    Is possible to have the module in a standard pve kernel? If not will use kvm for x2go server.

    best regards, rob f.
     
  2. sigxcpu

    sigxcpu Member

    Joined:
    May 4, 2012
    Messages:
    433
    Likes Received:
    9
    It is build into the kernel, not as a separate module:

    Code:
    # grep fuse /lib/modules/4.2.3-2-pve/modules.builtin
    kernel/fs/fuse/fuse.ko
    
     
  3. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    so that means lsmod won't show fuse as it is built in. thank you.
     
  4. Cypouz

    Cypouz New Member

    Joined:
    Dec 16, 2015
    Messages:
    2
    Likes Received:
    1
    Hi!

    Post edit: I previously suggested to rename kernel/fs/fuse/cuse.ko to kernel/fs/fuse/fuse.ko. It's not a good thing. There is no typo error.

    Solution just below.
     
    #4 Cypouz, Dec 16, 2015
    Last edited: May 1, 2016
  5. Cypouz

    Cypouz New Member

    Joined:
    Dec 16, 2015
    Messages:
    2
    Likes Received:
    1
    To activate fuse in LXC container, it's necessary to create the corresponding dev node. With root:
    Code:
    mknod -m 666 /dev/fuse c 10 229
    
     
    #5 Cypouz, Dec 16, 2015
    Last edited: May 1, 2016
    imadk95 likes this.
  6. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    I just ran into this today trying to use fuse in an ubuntu lxc.... is there a fix to get this working?
     
  7. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    I just submitted a bug report.
     
  8. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    is there a functioning work around to get fuse working in an lxc container? no movement on the bug report it seems
     
  9. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    did you try the suggestion from post #4 above?
     
  10. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    Yes I made a copy

    Code:
    modules/4.2.2-1-pve/kernel/fs/fuse# cp cuse.ko fuse.ko
    
    but trying to make an encfs mount errors with:

    Code:
    fuse: device not found, try 'modprobe fuse' first
    fuse failed.  Common problems:
    - fuse kernel module not installed (modprobe fuse)
    - invalid options -- see usage message
    
    and trying to mount with acd_cli (https://github.com/yadayada/acd_cli) fails with

    Code:
    fuse: device not found, try 'modprobe fuse' first
    Traceback (most recent call last):
      File "/usr/local/bin/acd_cli", line 9, in <module>
        load_entry_point('acdcli==0.3.1', 'console_scripts', 'acd_cli')()
      File "/usr/local/bin/acd_cli.py", line 1437, in main
        sys.exit(args.func(args))
      File "/usr/local/bin/acd_cli.py", line 959, in mount_action
        allow_root=args.allow_root, allow_other=args.allow_other)
      File "/usr/local/lib/python3.4/dist-packages/acdcli/acd_fuse.py", line 686, in mount
        **kwargs
      File "/usr/local/lib/python3.4/dist-packages/acdcli/bundled/fuse.py", line 416, in __init__
        raise RuntimeError(err)
    RuntimeError: 1
    
     
  11. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    on the pve host did you try:
    Code:
    modprobe fuse
    
     
  12. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    on pve host 'modprobe fuse' completes
    trying it in an ubuntu lxc container:
    Code:
    # modprobe fuse
    modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.2-1-pve/modules.dep.bin'
    
    and I still get the same errors I posted above when trying to use fuse in a container
     
  13. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    modprobe does not need to be done in the container.
     
  14. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    ok, but doing it on pve host still didn't make it work in the container, maybe I'm missing something basic? Tried rebooting pve host after copying cuse.ko to fuse.io and doing modprobe fuse on host but still not working in container :(
     
  15. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    I think it may be a bug with lxc . Lets see if one of the devs will reply.

    It smells like a bug. There were some updates that came up within last day for pve-testing
    try upgrading debs [ there is a kernel upgrade so reboot] then if still an issue file a bug report ?
     
  16. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    I appear to be up to date via dist-upgrade (I'm not on testing repo)

    I just tried this fix in the container https://github.com/lxc/lxc/issues/80

    Code:
    # mknod -m 666 /dev/fuse c 10 229
    
    looks like it's working now! Guess I just needed the combo of renaming cuse.ko on pve and adding the fuse node in the container.
     
    JānisE likes this.
  17. RobFantini

    RobFantini Active Member
    Proxmox Subscriber

    Joined:
    May 24, 2012
    Messages:
    1,488
    Likes Received:
    21
    great!

    And in that link 'kernel/fs/fuse/cuse.ko' is listed. I guess that is not a typo as suggested in post 4 above..

    fuse is built in to the kernel so probably all that is needed to fix the issue is the mknod. no need fro modprobe to fix the issue.

    thank you for finding the solution!
     
  18. RollMops

    RollMops New Member

    Joined:
    Jul 17, 2014
    Messages:
    25
    Likes Received:
    0
    didn't work for me...

    on host (Linux 4.2.6-1-pve):
    • dist-upgraded (I have no subscription, so I used apt.source
      "deb http://download.proxmox.com/debian jessie pve-no-subscription")
    • copied cuse.ko to fuse.ko in /lib/modules/4.2.6-1-pve/kernel/fs/fuse
    • rebooted

    in container (latest, freshly dist-upgraded Debian too – here I want to use sshfs which requires fuse) on calling sshfs, I get:
    Code:
    # fuse: device not found, try 'modprobe fuse' first
    # modprobe fuse
    modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.2.6-1-pve/modules.dep.bin'
    
    
    I will preliminary use a VM instead of a CT, still I guess this should be fixed (or maybe s.o. can give us a lil hint) :)

    Thanks,
    R.
     
    #18 RollMops, Jan 21, 2016
    Last edited: Jan 21, 2016
  19. a5m0deu5

    a5m0deu5 New Member

    Joined:
    Mar 21, 2012
    Messages:
    12
    Likes Received:
    1
    can you try running this command in your container as root?
    Code:
    mknod -m 666 /dev/fuse c 10 229
    
     
  20. RollMops

    RollMops New Member

    Joined:
    Jul 17, 2014
    Messages:
    25
    Likes Received:
    0
    #mknod -m 666 /dev/fuse c 10 229
    #
    (= no output)

    is that good or bad? :)

    krgds,
    ~R.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice