2

I want to mount a Google bucket to a local server. However, when I run the line, the directory I point it to is empty. Any ideas?

gcsfuse mssng_vcf_files ./mountbucket/

It reports:

File system has been successfully mounted.

but the directory mountbucket/ is empty.

  • did you solve the issue eventually? same here! – Ma Ba Jul 10 '18 at 19:33
  • It may happen because you don't have permission to access "mssng_vcf_files" bucket. Can you check that the GCP account you are running gcsfuse command has access permission to that bucket? – Yurci Jul 11 '18 at 12:22

1 Answers1

3

gcsfuse will not show any directory defined by a file with a slash in its name. So if your bucket contains /files/index.txt it will not show until you create a object named files. I am assuming here your bucket contains directories then files, and if that is the case this may be your problem.

gcsfuse supports a flag called --implicit-dirs that changes the behaviour. When this flag is enabled, name lookup requests from the kernel use the GCS API's Objects.list operation to search for objects that would implicitly define the existence of a directory with the name in question. So, in the example above, there would appear to be a directory named "files".

There are some drawbacks which are defined here - https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/semantics.md#implicit-directories

So you have 2 options

  1. Create the directories in your bucket which will make your files appear

  2. Look at --implicit-dirs flag to get them to always appear.

Hope this helps.

Josh Stevens
  • 3,943
  • 1
  • 15
  • 22