I am running an instance on gcloud compute engine. I need to mount a Google storage bucket (which belongs to a different project) to my instance. The instance runs on Debian Wheezy. I have installed gcc, fuse, gcsfuse. But when I tried to mount the bucket:
$ gcsfuse bucket-name /mnt/bucket-name
I got the error:
stderr:
fusermount: fuse device not found, try ‘modprobe fuse’ first
Tried «modprobe fuse», I got error:
-bash: modprobe: command not found
Anyone knows what the problem might be, or anyone has encountered the same issue? Any thoughts, comments, help would be much appreciated. Thanks in advance!
asked Aug 31, 2016 at 8:33
user3175643user3175643
811 gold badge1 silver badge4 bronze badges
In case someone is using Cloud Run on Google Cloud Platform, second generation of execution environment should be used.
gcloud beta run deploy filesystem-app --source .
--allow-unauthenticated
--service-account fs-identity
--update-env-vars BUCKET=[YOUR_BUCKET]
--region=europe-north1
--execution-environment gen2
Flag --execution-environment gen2
it vital based on documentation:
You should use second generation if any of the following apply to your Cloud Run service:
- Your service needs to use a network file system, which is only supported by second generation.
- ...
answered Apr 13, 2022 at 20:07
To locate a command on your system, you can use whereis
which will search all the common locations to give you the full path.
whereis modprobe
.. on my system outputs:
modprobe: /sbin/modprobe /etc/modprobe.d /etc/modprobe.conf /lib/modprobe.d /usr/share/man/man8/modprobe.8.bz2
In this case, and probably yours, you would then know to call it as /sbin/modprobe fuse
.
answered Sep 1, 2016 at 6:13
1
I’m trying to install and use FUSE inside a Docker container. My Dockerfile is the following:
FROM golang:1.8
WORKDIR /go/src/app
COPY . .
RUN apt-get update && apt-get install -y fuse && rm -rf /var/lib/apt/lists/*
RUN go-wrapper download
RUN go-wrapper install
CMD ["go-wrapper", "run", "/mnt"]
When I run the program mounting FUSE, I get: /bin/fusermount: fuse device not found, try 'modprobe fuse' first
.
If I install kmod
and run modprobe fuse
during the build step, I get the error:
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.104-boot2docker/modules.dep.bin'
How can I fix this?
asked Jan 23, 2018 at 12:50
2
With respect to Nickolay’s answer below, the --privileged
flag is not strictly required, for fuse. And you’re best to avoid giving that much privilege to your container.
You should be able to get things working by replacing it with --cap-add SYS_ADMIN
like below.
docker run -d --rm
--device /dev/fuse
--cap-add SYS_ADMIN
<image_id/name>
Sometimes this may not work. In this case, you should try and tweak the AppArmor profile or just disable it as follows:
docker run -d --rm
--device /dev/fuse
--cap-add SYS_ADMIN
--security-opt apparmor:unconfined
<image_id/name>
Finally, if all fails, use —privileged flag.
Drew
6,0714 gold badges43 silver badges44 bronze badges
answered Feb 28, 2018 at 2:37
5
Just as a workaround you can do the modprobe fuse
on your host, then using --device /dev/fuse
to get the device in the container. Anyway container should be started in privileged mode to mount things with the /dev/fuse
.
The command to run the docker image is:
docker run -d --rm --device /dev/fuse --privileged <image_id/name>
answered Jan 27, 2018 at 19:02
nickgrygnickgryg
24k5 gold badges73 silver badges76 bronze badges
5
Во время работы часто приходится работать с удаленными файлами, часто через ssh. Gnome позволяет подключиться и работать с данными с помощью утилиты Places->Connect to Server, но, к сожалению, таким образом могут работать не все программы… Vim, например, а так как это основной мой редактор — я искал способ сделать это. И нашел
Все, что написано дальше — касается Linux, в частности Ubuntu Linux.
Итак, способ: смонтировать удаленую систему так же, как вы монтируете локальные диски. Сделать такое возможно с поомщью утилиты sshfs.
Для начала надо ее установить вместе с несколькими зависимостями:
$sudo apt-get install sshfs
Потом нужно добавить себя в группу пользователей fuse. Сделать это надо, потому что программа устанавливвается в системные папки, в которые обычным пользователям доступ запрещен. Так, добавляем себя в группу:
$sudo adduser <Пользователь> fuse
Потом создаем директорию для монтирования, например, на рабочем столе:
$mkdir ~/Desktop/test_ssh
Теперь надо выйти с терминала и зайти вновь. Все, теперь мы в группе fuse. Пробуем соединиться с сервером:
$sshfs user@example.com:/stuff ~/Desktop/test_ssh
Если соединение идет не по ключу то, скорее всего, у вас появится запрос на введение пароля с удаленной машины.
Если же вы сразу не получили ошибку fusermount: fuse device not found, try ‘modprobe fuse’ first — проверяйте директорию, там должны появиться файлики :). Если же вылезла ошибка — значит модуль ядра fuse не загрузился автоматом, пробуем загрузить вручную:
$sudo modprobe fuse
Пробуем установить соединение еще раз.
Чтобы отмонтировать это все дело, надо выполнить следующее:
$fusermount -u ~/Desktop/test_ssh
Чтобы каждый раз не вводить такую кучу комманд — создаем(если нету) и редактируем файл ~/.bash_aliases, добавляя в конец такие строчки:
alias testssh='sshfs user@example.com:/stuff ~/Desktop/test_ssh'
alias testssh_umount='fusermount -u ~/Desktop/test_ssh'
Теперь вы сможете монтировать удаленную машину командой testssh, а размонтировать — testssh_umount
Cпасибо за внимание!
ЗЫ Статью сначала перевел с английского на украинский, добавил немного своего и перевел на русский для Хабра
-
BKFC
- Posts: 31
- Joined: Wed Apr 10, 2019 8:19 am
- languages_spoken: english
- ODROIDs: N2
-
Has thanked:
4 times -
Been thanked:
1 time - Contact:
[SOLVED] Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
I can successfully mount a drive on my Mac vi sshfs to several Ubuntu and Raspberry Pi machines (and then make it permanent with an entry in /etc/fstab), including an Odroid N2 running Ubuntu 18.04, but when I upgraded the Odroid to 20.04, the drive is no longer mounted at boot time, and when I try to mount by hand, I get the following:
/% sshfs RemoteMac:RemoteDir LocalDir
fuse: device not found, try ‘modprobe fuse’ first
And then when I enter
/% modprobe fuse
I get
modprobe: FATAL: Module fuse not found in directory /lib/modules/4.9.230-89
Not sure how to fix this.
-
BKFC
- Posts: 31
- Joined: Wed Apr 10, 2019 8:19 am
- languages_spoken: english
- ODROIDs: N2
-
Has thanked:
4 times -
Been thanked:
1 time - Contact:
Re: Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
Post
by BKFC » Fri Dec 11, 2020 11:26 am
after
sudo apt update
sudo apt upgrade
I rebooted. The first thing I discovered was that sshfs was gone, so I went and installed it again.
Then…
~/% uname -a
Linux [MyOdroid] 4.9.230-89 #1 SMP PREEMPT Tue Jul 14 13:08:17 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
~/% sudo sshfs MyMac:HostDir ClientDir
fuse: device not found, try ‘modprobe fuse’ first
~/% sudo modprobe fuse
modprobe: FATAL: Module fuse not found in directory /lib/modules/4.9.230-89
I don’t have 4.9.236-xx, but supposedly everything is up to date.
-
odroid
- Site Admin
- Posts: 40594
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English, Korean
- ODROIDs: ODROID
-
Has thanked:
3021 times -
Been thanked:
1676 times - Contact:
Re: Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
Post
by odroid » Fri Dec 11, 2020 12:36 pm
Very weird.
I’m running 4.9.236-160 kernel and ‘fuse’ module loaded fine after system update.
Code: Select all
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.9.236-106 aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Last login: Wed Jul 15 07:45:32 KST 2020 on ttyS0
root@odroid:~#
root@odroid:~# uname -a
Linux odroid 4.9.236-106 #1 SMP PREEMPT Wed Dec 2 22:00:52 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:~# modprobe fuse
root@odroid:~#
root@odroid:~# lsmod
Module Size Used by
fuse 110592 1
cpufreq_ondemand 20480 0
cpufreq_powersave 16384 0
cpufreq_userspace 16384 0
cpufreq_conservative 16384 0
joydev 24576 0
hid_logitech_hidpp 32768 0
i2c_meson_master 20480 0
hid_logitech_dj 24576 0
sch_fq_codel 20480 2
amvdec_vp9 122880 0
amvdec_vc1 65536 0
amvdec_real 45056 0
amvdec_mmpeg4 40960 0
amvdec_mpeg4 65536 0
amvdec_mpeg12 106496 0
amvdec_mmjpeg 28672 0
amvdec_mjpeg 40960 0
amvdec_h265 147456 0
amvdec_h264mvc 57344 0
amvdec_mh264 159744 0
amvdec_h264 147456 0
amvdec_avs 69632 0
stream_input 180224 8 amvdec_h265,amvdec_mh264,amvdec_h264mvc,amvdec_real,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
decoder_common 188416 14 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
firmware 28672 15 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,decoder_common,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mpeg4
media_clock 45056 9 amvdec_h265,amvdec_mh264,decoder_common,firmware,stream_input,amvdec_vp9,amvdec_h264,amvdec_mpeg12,amvdec_avs
ip_tables 28672 0
x_tables 49152 1 ip_tables
ipv6 466944 24
spidev 20480 0
spi_meson_spicc 20480 0
-
odroid
- Site Admin
- Posts: 40594
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English, Korean
- ODROIDs: ODROID
-
Has thanked:
3021 times -
Been thanked:
1676 times - Contact:
Re: Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
Post
by odroid » Fri Dec 11, 2020 12:52 pm
Try reinstalling the kernel package manually.
Code: Select all
root@odroid:~# apt install --reinstall linux-odroid-n2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libsndio6.1
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 27.6 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.odroid.in/n2 focal/main arm64 linux-odroid-n2 arm64 2:4.9.236-106 [27.6 MB]
Fetched 27.6 MB in 8s (3479 kB/s)
(Reading database ... 84629 files and directories currently installed.)
Preparing to unpack .../linux-odroid-n2_2%3a4.9.236-106_arm64.deb ...
Unpacking linux-odroid-n2 (2:4.9.236-106) over (2:4.9.236-106) .............]
Setting up linux-odroid-n2 (2:4.9.236-106) .................................]
update-initramfs: Generating /boot/initrd.img-4.9.236-106...................]
Image Name: uInitrd
Created: Fri Dec 11 12:50:05 2020
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 11935970 Bytes = 11656.22 KiB = 11.38 MiB
Load Address: 00000000
Entry Point: 00000000
.
root@odroid:~#
- These users thanked the author odroid for the post:
- BKFC (Fri Dec 11, 2020 1:03 pm)
-
BKFC
- Posts: 31
- Joined: Wed Apr 10, 2019 8:19 am
- languages_spoken: english
- ODROIDs: N2
-
Has thanked:
4 times -
Been thanked:
1 time - Contact:
Re: Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
Post
by BKFC » Fri Dec 11, 2020 1:03 pm
That worked! When I rebooted I got
~/% uname -a
Linux Franklin 4.9.236-106 #1 SMP PREEMPT Wed Dec 2 22:00:52 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
and also the mount point was already populated via /etc/fstab.
I never would have thought to do this. Thanks!
-
mad_ady
- Posts: 11219
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
- Location: Bucharest, Romania
-
Has thanked:
647 times -
Been thanked:
1060 times - Contact:
Re: Ubuntu 20.04: “fuse: device not found, try ‘modprobe fuse’ first”
Post
by mad_ady » Fri Dec 11, 2020 2:35 pm
Happened to me as well a few years ago on a C2 with emmc. It couldn’t connect to NFS shares. Turns out the kernel image had a different checksum. It must have corrupted itself and something stopped working. A kernel reinstall fixed it.
-
odroid
- Site Admin
- Posts: 40594
- Joined: Fri Feb 22, 2013 11:14 pm
- languages_spoken: English, Korean
- ODROIDs: ODROID
-
Has thanked:
3021 times -
Been thanked:
1676 times - Contact:
Who is online
Users browsing this forum: No registered users and 2 guests