在OpenShift上超出磁盘配额 [英] Disk quota exceeded on OpenShift

查看:160
本文介绍了在OpenShift上超出磁盘配额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将应用程序部署到OpenShift,并且工作良好,直到提出更改为止.然后它开始警告我有关磁盘配额已超出的信息,并且我无能为力了.

I just deployed application to OpenShift, and it worked fine, until I ment to push changes. Then it started to warn me about disk quota exceeded, and I'm not able to do anything anymore.

从终端运行rhc app-tidy [app-name]给了我这个:

Running rhc app-tidy [app-name] from terminal gave me this:

Warning: Gear 5395736e5004467cae0004ba is using 100.0% of disk quota
Failed to execute: 'control start' for /var/lib/openshift/5395736e5004467cae0004ba/nodejs

app-root/logs文件夹为空.

正在运行du -h * | sort -rh | head -50,这是给我的:

Running du -h * | sort -rh | head -50, gives me this:

481M    mongodb/data
481M    mongodb
385M    mongodb/data/journal
275M    app-root/runtime
275M    app-root
267M    app-deployments/2014-06-09_04-51-12.537
267M    app-deployments
157M    app-root/runtime/repo
156M    app-deployments/2014-06-09_04-51-12.537/repo
125M    app-root/runtime/repo/node_modules
125M    app-deployments/2014-06-09_04-51-12.537/repo/node_modules
119M    app-root/runtime/dependencies/.npm
119M    app-root/runtime/dependencies
111M    app-deployments/2014-06-09_04-51-12.537/dependencies/.npm
111M    app-deployments/2014-06-09_04-51-12.537/dependencies

不确定mongodb/data为什么要占用这么多空间,到底有什么用?我的数据库应该为空.

Not sure why mongodb/data is taking so much space and what exactly is there? My database should be empty.

**更新**

在mongodb/data文件夹上运行后,这是我得到的:

After running on my mongodb/data folder, here's what I got:

total 97M
drwxr-xr-x.  3 5395736e5004467cae0004ba 5395736e5004467cae0004ba 4.0K Jun  9 05:21 .
drwxr-xr-x. 11 5395736e5004467cae0004ba 5395736e5004467cae0004ba 4.0K Jun  9 04:44 ..
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 04:45 admin.0
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 04:45 admin.ns
drwxr-xr-x.  2 5395736e5004467cae0004ba 5395736e5004467cae0004ba 4.0K Jun  9 06:51 journal
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 06:51 local.0
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 06:51 local.ns
-rwxr-xr-x.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba    0 Jun  9 06:51 mongod.lock
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 04:45 surge.0
-rw-------.  1 5395736e5004467cae0004ba 5395736e5004467cae0004ba  16M Jun  9 04:45 surge.ns

推荐答案

对我有帮助的事情是禁用

Something that also helped me was to disable journaling

列出完整步骤

  1. SSH进入您的OpenShift

  1. SSH into your OpenShift

rhc ssh $@ -a $app

  • 在MongoDB配置中

  • In the MongoDB configuration

    vim ~/mongodb/conf/mongodb.conf
    

    添加或设置

    nojournal = true
    

  • 注意:~自动解析为/var/lib/openshift/<YOUR_OPENSHIFT_ID>

    1. 删除以前的日记数据

    1. Delete previous journal data

    rm ~/mongodb/data/journal/*
    

    然后退出SSH,然后

    1. 重新启动MongoDB

    1. restart MongoDB

    rhc cartridge-restart mongodb-2.4 -a $app
    

    这当然是以不记录日志为代价的,这对于恢复数据损坏或不正常关机的情况下.但是,如果您只是测试事情而已,并且空间不足,那么禁用日志记录会非常有帮助,因为它会占用大量空间.

    This of course, comes at the cost of not journaling, which is helpful for recovering the data in case of corruption or unclean shutdown. But if you're just testing things out and running out of space then disabling journaling can be very helpful as it takes a lot of space.

    这篇关于在OpenShift上超出磁盘配额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆