Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

GCSFUSE mount error of bucket as folder in a compute engine VM

We have installed VCPUBLISHER, a 3D Map authoring tool, on a GCP VM.

The bucket is public, and the default compute engine account has the Storage Admin role.

The application displays the data based on a path configuration by specifying the location of the files. By testing the application with the files stored locally we can display the data from the app without a problem. We want to test the application from a compute engine instance, however, because the data is very large in size, more than 40 GB on average per dataset, we would like to test it with the data stored in a cloud storage bucket.

To mount the folder we run the following command:

gcsfuse gs://bucket_name /var/full/path/to/mount/location

This is supposed to mount the bucket as a directory in the virtual machine's OS, an operation that we have already done using the GCSFUSE utility on other virtual machines. However, in this case we get the following error:

Error while mounting gcsfuse: mountWithArgs: mountWithStorageHandle: fs.NewServer: create file system: SetUpBucket: Error in iterating through objects: storage: bucket doesn't exist

When listing the bucket and its contents using "gsutil ls", we can see the contents listed without any problems, but when reviewing the gcsfuse log in more detail, it shows this other error:

Error returned from GetStorageLayout: rpc error: code = InvalidArgument desc = Invalid storage layout name. Storage layout name should be a valid bucket resource name followed by '/storageLayout'.\nerror details: name = ErrorInfo reason = INVALID_STORAGE_LAYOUT_NAME domain = storage.googleapis.com metadata = map[ ]

Any help about how to solve this problem is greatly appreciated.

Solved Solved
0 2 652
1 ACCEPTED SOLUTION

Hi @luismgarcia

It seems that the cause of error is the invalid syntax used in mounting the folder. You may try re mounting the folder using the the following command:

 

gcsfuse BUCKET_NAME "$HOME/mount-folder"

 

You may also try the following workarounds if you still encounter the same issue:

  • Make sure you have installed gcsfuse correctly on your compute engine instance and configured it with the necessary service account permissions.
  • Double-check the permissions of the default compute engine account. While the Storage Admin role should be sufficient, you might want to verify that it has specific permissions for reading objects within the bucket.

If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

View solution in original post

2 REPLIES 2

Hi @luismgarcia

It seems that the cause of error is the invalid syntax used in mounting the folder. You may try re mounting the folder using the the following command:

 

gcsfuse BUCKET_NAME "$HOME/mount-folder"

 

You may also try the following workarounds if you still encounter the same issue:

  • Make sure you have installed gcsfuse correctly on your compute engine instance and configured it with the necessary service account permissions.
  • Double-check the permissions of the default compute engine account. While the Storage Admin role should be sufficient, you might want to verify that it has specific permissions for reading objects within the bucket.

If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

First, after removing the text gs:// from the bucket_name the initial error was gone, but another error came up.

 

Error: daemonize.Run: readFromProcess: sub-process: Error while mounting gcsfuse: mountWithArgs: mountWithStorageHandle: mount: mount: running /usr/bin/fusermount: exit status 1 {"timestamp":{"seconds":1732648275,"nanos":630422867},"severity":"INFO","message":"2024/11/26 19:11:15.630397 Error occurred during command execution: daemonize.Run: readFromProcess: sub-process: Error while mounting gcsfuse: mountWithArgs: mountWithStorageHandle: mount: mount: running /usr/bin/fusermount: exit status 

 

Later, I was able to mount the bucket, but first the mount directory needed ownership and permissions for the current user:

 

sudo chown user:user /var/full/path/to/mount/location 
sudo chmod 755 /var/full/path/to/mount/location

 

 

Finally, the command was given some arguments until it did not produce any error while mounting and it looks like this:

 

gcsfuse -o allow_other --implicit-dirs bucket_name /var/full/path/to/mount/location