3
votes

I have installed gcsfuse to support an app requiring a posix-like mount point.

Existing data written with gsutil is not visible, but data written via the browser (Cloud Storage > Storage Browser) is.

According to https://cloud.google.com/storage/docs/gcsfuse -

You can simultaneously read and write to Google Cloud Storage using the Fuse Adapter and tools like gsutil. For example, if you write an object using the Fuse Adapter, it will immediately be available to read with gsutil, or vice versa, without the need to re-mount the bucket or reboot the Compute Engine instance.

Has anyone been successful collaborating with gcsfuse and gsutil?

I feel like I'm missing something.

Thanks!

1

1 Answers

7
votes

This is likely because gsutil doesn't create directory placeholder objects, and gcsfuse by default requires them in order for a directory to be visible. To confirm: when you write an object with gsutil in a directory that you can already see (e.g. the root), does it show up?

You can work around this in one of two ways:

  1. Create the directory placeholders for the directories you're missing. The easiest way to do this for a missing object foo/bar/baz is using a gcsfuse mount:

    mkdir -p foo/bar
    
  2. Run gcsfuse with the --implicit-dirs flag. Make sure to read the documentation linked above for caveats, though.