1

在 Google Cloud 上,我有 4 个存储桶,我有两个正在运行的虚拟机,一个是 Ubuntu 14,另一个是 16。在两台机器上,我可以挂载(gcsfuse)所有四个存储桶。

但是,我遇到了一个(并且只有一个)存储桶(project-x-logs)的问题。在运行 Ubuntu 14 的机器上,我可以创建一个文件:

user@instance-4 > pwd
/home/user/work/Project-X/project-x-logs
user@instance-4 > touch del.me
user@instance-4 > ls -l
total 0
-rw-r--r-- 1 user user 0 Jan 24 17:00 del.me
user@instance-4 > 

我可以在 Ubuntu 16 机器上看到它:

user@instance-gpu-6 > pwd
/home/user/work/Project-X
user@instance-gpu-6 > cd project-x-logs/
user@instance-gpu-6 > ls -l 
total 0
-rw-r--r-- 1 user user 0 Jan 24 17:00 del.me
user@instance-gpu-6 > 

所以看起来这个铲斗已经正确安装在两台机器上。

但是,当我尝试在 Ubuntu 16 机器上创建另一个文件时,出现错误:

user@instance-gpu-6 > pwd
/home/user/work/Project-X/project-x-logs
user@instance-gpu-6 > touch delmetoo.me
touch: cannot touch 'delmetoo.me': Input/output error
user@instance-gpu-6 > 

我已经尽可能多地打开了烫发,但似乎没有任何效果。

任何有关如何解决此问题或至少对其进行调试的建议将不胜感激。

4

1 回答 1

0

经过大量的实验和搜索,我能想出的最佳解决方案是运行以​​下命令:

(python35gpu) user@instance-gpu-6 > gcloud auth application-default login

You are running on a Google Compute Engine virtual machine.
The service credentials associated with this virtual machine
will automatically be used by Application Default
Credentials, so it is not necessary to use this command.

If you decide to proceed anyway, your user credentials may be visible
to others with access to this virtual machine. Are you sure you want
to authenticate with your personal account?

Do you want to continue (Y/n)?  Y

Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=big_long_link


Enter verification code: <paste sha-type code here>

Credentials saved to file: [/home/user/.config/gcloud/application_default_credentials.json]

These credentials will be used by any library that requests
Application Default Credentials.
(python35gpu) user@instance-gpu-6 > 

单击终端窗口中的 big_long_link 将在 Chrome 中打开一个选项卡,其中显示 sha 类型代码。将其剪切并粘贴到终端提示符中,这应该授予对任何新存储桶或现有存储桶的访问权限(它们仍然需要安装,但是0

于 2018-01-24T21:50:24.623 回答