2

I have an "old" Google Storage Bucket, which I'll call "foo-test" here, and a "new" bucket, "foo-01" (not their real names). I was able to copy the contents of the old bucket into the new bucket using "gsutil cp".

It worked. Or so I thought. If I go to the Google Storage Browser, the contents of the old bucket are present in the new one.

But my Google Compute instances can't see any of it!

When I mount the old bucket with

gcsfuse -o allow_other -file-mode=777 -dir-mode=777 foo-test /var/foo

and then I do

ls /var/foo

I get the contents of the bucket.

But when I mount the new bucket with

gcsfuse -o allow_other -file-mode=777 -dir-mode=777 foo-01 /var/foo

and then I do

ls /var/foo

I get nothing at all!

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
  • Can you run your mounting command with the --debug_gcs flag, like `gcsfuse --debug_gcs -o allow_other ...` see if it gives any indication? – LundinCast Jul 31 '18 at 14:37
  • @LundinCast Using mount point: /var/foo Opening GCS connection... Opening bucket... Mounting file system... File system has been successfully mounted. ONE OTHER NOTE: If the INSTANCE puts anything in the bucket, it shows up, looking at the bucket from both the instance and from the storage browser. – hbquikcomjamesl Jul 31 '18 at 16:45
  • Can you also check the ACLs on the new objects? By default, the gsutil cp command does not copy the object ACL to the new object, and instead will use the default bucket ACL, which may not grant you access. – LundinCast Jul 31 '18 at 17:01
  • Now, we're getting somewhere. What's an ACL, and how do I check it? – hbquikcomjamesl Jul 31 '18 at 18:29
  • @LundinCast "gsutil acl get" showed differences. And the copied directories in the new bucket showed "CommandException: No URLs matched" when I tried to "gsutil acl get" them. I tried wiping the new bucket clean, and doing a "gsutil cp -r -p" (instead of just "-r"). Same result. I finally ended up wiping the new bucket clean, mounting both buckets in an instance, and doing a "cp -r -P -p" from one bucket to the other. THAT worked. – hbquikcomjamesl Jul 31 '18 at 20:34

1 Answers1

0

I finally ended up wiping the new bucket clean, mounting both buckets in an instance, and doing a "cp -r -P -p" from one bucket to the other from the instance's command line. THAT worked. See my comments for what didn't.