You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过GCE VM使用Google Colab遇存储配额错误求助

解决GCE VM中Colab提示Drive存储配额超限但实际空间充足的问题

问题场景

在GCE虚拟机上运行Google Colab时,无法初始化或上传Notebook,报错The user has exceeded their Drive storage quota。但个人Drive存储显示15GB可用(0字节已用),管理员账号查看存储时显示0 bytes of shared 0 bytes (100%)且呈红色状态,虚拟机配置了200GB空间,系统日志无异常。

完整报错信息

The user has exceeded their Drive storage quota
GapiError: The user has exceeded their Drive storage quota
    at YI.YA [as constructor] (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:1433:2101)
    at YI.iH [as constructor] (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:2270:222)
    at new YI (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:2334:151)
    at JGa (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:2396:348)
    at xa.program_ (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:2410:131)
    at za (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:21:57)
    at xa.throw_ (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:20:201)
    at Aa.throw (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:22:89)
    at c (https://ssl.gstatic.com/colaboratory-static/common/456ec723e499489081e770703ac07ab8/external_polymer_binary.js:22:343)

排查与解决步骤

  • 重新授权Colab与Drive的关联
    断开Colab和Google Drive的连接:点击Colab界面右上角账号头像,选择“断开连接”,重新登录并授权Drive访问,确保勾选完整的Drive访问权限(不要仅选查看权限)。

  • 重置Drive挂载状态
    在Colab中执行以下代码,强制卸载并重新挂载Drive:

    from google.colab import drive
    drive.flush_and_unmount()
    drive.mount('/content/drive', force_remount=True)
    

    执行后按提示完成授权流程。

  • 检查GCP项目的共享存储配额配置
    管理员登录GCP控制台,进入Google Workspace > Drive and Docs > 存储配额,确认是否给该用户/组织设置了异常的共享配额(比如误设为0字节)。如果有错误配置,调整为合理值(比如匹配个人配额15GB)。

  • 清除浏览器缓存和Cookie
    关闭当前Colab标签页,清除浏览器中Google相关的缓存和Cookie,重新打开Colab登录,避免旧的配额缓存导致错误判断。

  • 验证VM的网络API访问权限
    在GCE VM中执行以下命令,测试Drive API的连通性:

    curl -I https://drive.googleapis.com/v3/about
    

    返回200系列状态码说明网络正常,否则需要调整防火墙或VPC配置。

内容的提问来源于stack exchange,提问作者DarknessPlusPlus

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 18:05:19