Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuse: device not found, try 'modprobe fuse' first #647

Closed
yellowmamba opened this issue Sep 18, 2017 · 19 comments
Closed

fuse: device not found, try 'modprobe fuse' first #647

yellowmamba opened this issue Sep 18, 2017 · 19 comments

Comments

@yellowmamba
Copy link

Additional Information

The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.

  • Version of s3fs being used (s3fs --version)
Amazon Simple Storage Service File System V1.82(commit:c5c1101) with OpenSSL
Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>
License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • Version of fuse being used (pkg-config --modversion fuse)
    2.9.4

  • System information (uname -a)
    Linux fae8d21da480 4.9.43-17.38.amzn1.x86_64 #1 SMP Thu Aug 17 00:20:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Distro (cat /etc/issue)
    Ubuntu 16.04 LTS \n \l

  • s3fs command line used (if applicable)
    N/A

  • /etc/fstab entry (if applicable):

# UNCONFIGURED FSTAB FOR BASE SYSTEM
my-bucket-name /mnt/s3-bucket fuse.s3fs _netdev,allow_other,umask=000,default_acl=public-read,use_cache=/tmp 0 0
  • s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
    if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
fuse: device not found, try 'modprobe fuse' first

Details about issue

I am not sure why, it used to work for my other projects. When I am prompt with this error message, I tried modprobe fuse and got bash: modprobe: command not found. Really out of ideas of what went wrong. Can anyone assist?

Thanks

@yellowmamba
Copy link
Author

hmm, I am pretty sure now it's because of this line in /etc/fstab

# UNCONFIGURED FSTAB FOR BASE SYSTEM

But I have no idea why it's not configured.

@yellowmamba
Copy link
Author

OK, it was due to docker run permission issue, need a --privileged flag. Unrelated to s3fs itself. Sorry.

@audiofeature
Copy link

@yellowmamba Can you explain in more detail how this is solved? I don't know where to use that --privileged flag.

@yellowmamba
Copy link
Author

Hi @audiofeature , it's a flag you can attach to docker, i.e. docker run --privileged.

@sougiovn
Copy link

@yellowmamba not every hero wears a cape...
How did you figured this out?

@braco
Copy link

braco commented Apr 17, 2018

There has to be some way to fix this with a pure Dockerfile

@rustyx
Copy link

rustyx commented May 29, 2018

--privileged gives too many permissions to the container.

FUSE functionality needs in fact only the following permissions:

--cap-add SYS_ADMIN --device /dev/fuse

SYS_ADMIN is needed for mount/umount functionality, and /dev/fuse exposes the FUSE device to the container.

@diman82
Copy link

diman82 commented Jan 6, 2019

I'm still facing this issue, running docker-compose with 'privileged: true' in yml file.
Any ideas what I'm missing?

@gnosisgithub
Copy link

So 'docker --privileged run ...'?

@Dr-Steve
Copy link

This does not work in the context of AWS and Fargate, where you are not allowed to run with --privileged or --device (see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)

Is there any way to get around this?

@ChrisPappalardo
Copy link

I have the same issue as @Dr-Steve. I tried following this answer and ran into the device not found here discussed here. If I set privileged mode in development, it works, but that is not supported by AWS Fargate. Is there a recommended way to use s3fs with AWS Fargate that is also compatible with ecs-cli?

@nminhquang
Copy link

Try to run docker container with these options:
--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined

@dnz-bdeboer
Copy link

In case people come back here and think the last solution applies to Fargate: it does not. Fargate does not support SYS_ADMIN capability. You probably need to run your container in ECS. No big deal.

@ChrisPappalardo
Copy link

Following up on this, I abandoned using s3fs in ECS with Fargate, it's much cleaner and easier using EFS which can be mounted via the task definition. If you really need to use S3, I suggest using it at the app level via an SDK (such as boto3 in python). S3 just isn't great for block-level storage in my opinion and I've had multiple issues trying to implement it that way.

@ayush5112

This comment has been minimized.

@Abdelrahman-Abbas
Copy link

Did anyone solve such an issue when working with google cloud build to build the docker? I think it doesn't have the --privileged option. Any help?

@sinnrrr
Copy link

sinnrrr commented May 14, 2022

to add this permission to docker-compose managed container add the following to the config file:

    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse

@lebyanelm
Copy link

How do you apply these fixes on a docker container running under kubectl?

chance2021 pushed a commit to PilotDataPlatform/helm-charts that referenced this issue Jul 22, 2022
YuviGold added a commit to YuviGold/mercado that referenced this issue Oct 31, 2022
At first tried installing libfuse as the AppImage error message presents
s3fs-fuse/s3fs-fuse#647 (comment)

But eventually found out about
AppImage/AppImageKit#912 (comment)
which is not an optimized solution, but it is preffered instead of
providing sys admin privileges to a docker container.
PandasAreBears pushed a commit to PandasAreBears/ipswflatten that referenced this issue Feb 3, 2024
This is a neccesity when using apfs-fuse as pointed out in s3fs-fuse/s3fs-fuse#647
@KMint1819
Copy link

I've tried --cap-add SYS_ADMIN --device /dev/fuse but then it shows

fuse: mount failed: Permission denied

Cannot mount AppImage, please check your FUSE setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests