Google Compute Engine 报告只读光盘

Google Compute Engine reports a read-only disc

我已经创建了一个 standard persistent disk 并成功地将其安装在我的 Kubernetes 集群中的一个节点上的 Read/Write 配置中。

我现在想用我目前在本地拥有的一些内容填充该磁盘。 gcloud SDK 中的 scp tool 似乎是执行此操作的理想方式。

然而,当我运行:

gcloud compute scp ~/Desktop/subway-explorer-api/logbooks.sqlite gke-webapp-default-pool-49338587-d78l:/mnt/subway-explorer-datastore --zone us-central1-a

我得到:

scp: /mnt/subway-explorer-datastore: Read-only file system
ERROR: (gcloud.compute.scp) [/usr/bin/scp] exited with return code [1].

我的问题是:

我误解了磁盘安装到的文件夹,我试图写入一个实际上不存在的文件夹。错误消息导致我将其误诊为权限错误,而实际上这是操作员错误。

有关详细信息,请参阅 this answer on the Unix StackExchange