0

我正在尝试在启动(或访问)第一种方式期间将 google 存储桶安装到实例 - 通过 fstab:

alex-backup-test /mount gcsfuse uid=0,gid=0,rw,user,key_file=/etc/google/service-account.json

重新启动后它没有安装(但是当我尝试手动执行此操作时 - 没关系

mount /mount/
Calling gcsfuse with arguments: --gid 0 --key-file /etc/google/service-account.json -o rw -o noexec -o nosuid -o nodev --uid 0 alex-backup-test /mount
Using mount point: /mount
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.

第二种方式 - 使用 autofs: 在 auto.master 中:

/mount /etc/auto.gcsfuse        --timeout=60 --verbose

auto.gcsfuse:

桶 -fstype=gcsfuse,uid=0,gid=0,rw,noexec,nodev,key_file=/etc/google/service-account.json :alex-backup-test

在日志中:

May 10 09:25:09 alex-backup-test automount[31312]: mounted indirect on /mount with timeout 60, freq 15 seconds
May 10 09:25:21 alex-backup-test automount[31312]: attempting to mount entry /mount/bucket
May 10 09:25:21 alex-backup-test automount[31312]: >> Calling gcsfuse with arguments: -o rw -o noexec -o nodev --uid 0 --gid 0 --key-file /etc/google/service-account.json alex-backup-test /mount/bucket
May 10 09:25:21 alex-backup-test automount[31312]: >> Using mount point: /mount/bucket
May 10 09:25:21 alex-backup-test automount[31312]: >> Opening GCS connection...
May 10 09:25:21 alex-backup-test automount[31312]: >> Opening bucket...
May 10 09:25:22 alex-backup-test automount[31312]: >> Mounting file system...

它被卡住了。

附言。但是 gcsfuse 的选项在手动和 autofs 挂载上似乎相似。

非常感谢您的建议!

4

1 回答 1

0

NVM,问题是由 SELinux 引起的...

于 2017-05-11T14:59:06.127 回答