Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcsfuse mount exits with status 1

trying to use gcsfuse, but when I run

gcsfuse <bucket> /target/dir

I keep getting this error

daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: fusermount: exit status 1

I'm doing this from a GCE instance with full API access permissions to Google Cloud services

The folder exists and I'm in the fuse group.

I tried running with all the debug switches, but they reveal nothing helpful

> gcsfuse --uid "33" --gid "33" --debug_fuse --debug_gcs --debug_http --debug_invariants bucket-name /target/dir
Using mount point: /target/dir
Opening GCS connection...
Opening bucket...
Mounting file system...
daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithConn: Mount: mount: fusermount: exit status 1

version info: gcsfuse version 0.15.0 (Go version go1.5.2)

like image 605
Peter Li Avatar asked Dec 24 '22 10:12

Peter Li


2 Answers

my /target/dir was owned by www-data:fuse, but the group didn't have write permission on the directory before mounting.

like image 193
Peter Li Avatar answered Jan 13 '23 12:01

Peter Li


I had the same issue, as I was trying to mount a folder on a docker container. However, there it turned out to be that the container needs to run in privileged mode in order for gcsfuse to work.

docker --privileged docker-image-name

The above command works fine. Alternatively, if anyone is using kubernetes, the security context needs to be specified as follows:

  containers:
  - name: application-name
    securityContext:
      privileged: true
like image 20
dbakiu Avatar answered Jan 13 '23 14:01

dbakiu