'rhc tidy'没有足够磁盘空间时如何在openshift上清理磁盘空间? [英] How to cleanup disk space on openshift when 'rhc tidy' has not enough disk space?
问题描述
文件系统块配额限制宽限文件配额限制宽限
/ dev / mapper / EBSStore01-user_home01
1048572 0 1048576 6890 0 80000
我发现了一个不同的stackoverflow问题可以通过'rhc app-tidy'清理磁盘空间
但是当我运行这个命令时,出现以下错误:
警告:Gear xxx正在使用磁盘配额的100.0%
无法执行:/ var / lib / openshift / xxx / mysql的'control start'
当我运行以下命令时,请查看哪些文件使用的空间最大
du -h * | sort -rh | head -50
我得到以下输出:
605M wildfly
320M git / mythings.git / objects
320M git / mythings.git
320M git
317M wildfly / usr /lib/jvm/jdk1.8.0_05
317M wildfly / usr / lib / jvm
317M wildfly / usr / lib
317M wildfly / usr
166M wildfly / usr / lib / jvm / jdk1.8.0_05 / jre
165M wildfly / usr / lib / jvm / jdk1.8.0_05 / jre / lib
136M野蛮/版本/ 8
136M野蛮/版本
118M wildfly / versions / 8 / modules
118M wildfly / usr / lib / jvm / jdk1.8.0_05 / lib
118M wildfly / modules
116M wildfly / versions / 8 / modules / system / layers / base
116M wildfly / versions / 8 / modules / system / layers
116M wildfly / versions / 8 / modules / system
116M wildfly / modules / system / layers / base
116M野蛮/模块/系统/层
116M野蛮/模块/系统
95M野蛮/版本/ 8 /模块/系统/层/基地/组织
95M野蛮/模块/系统/层/ BAS e / org
59M wildfly / usr / lib / jvm / jdk1.8.0_05 / jre / lib / i386
52M mysql / data
52M mysql
49M wildfly / usr / lib /jvm/jdk1.8.0_05/lib/missioncontrol
43M wildfly / usr / lib / jvm / jdk1.8.0_05 / lib / missioncontrol / plugins
37M wildfly / versions / 8 / modules / system / layers / base / org / jboss
37M wildfly / modules / system / layers / base / org / jboss
32M wildfly / usr / lib / jvm / jdk1.8.0_05 / lib / visualvm
28M git / mythings.git / objects / 76
26M wildfly / usr / lib / jvm / jdk1.8.0_05 / jre / lib / ext
26M git / mythings.git / objects / pack
26M git / mythings.git / objects / f6
21M wildfly / usr / lib / jvm / jdk1.8.0_05 / lib / visualvm / platform
21M app-root / runtime / repo
21M app-root / runtime
21M app-root
21M app-deployments / 2014-08-04_14-34-47.614 / repo
21M app-deployments / 2014-08-04_14-34- 47.614
21M应用程序部署
20M萤火虫/版本/ 8 / modules / system / layers / base / org / jboss / as
20M wildfly /模块/系统/图层/ base / org / jboss / as
20M git / mythings.git / objects / ac
20M g it / mythings.git / objects / 8a
20M git / mythings.git / objects / 6e
20M git / mythings.git / objects / 69
20M git / mythings.git / objects / 21
20M git / mythings.git / objects / 12
正如你所看到的git目录占用大量空间,但是当我尝试做'git gc'时,出现以下错误:
计数对象:226,完成。
使用多达2个线程的增量压缩。
压缩对象:100%(192/192),完成。
dm-0:写入失败,达到用户块限制。
fatal:sha1文件'/var/lib/openshift/xxx/git/mythings.git/objects/pack/tmp_pack_ipHspL'写入错误:磁盘配额超过
错误:无法运行重新包装
所以现在我已经没有想法了,我可以做些什么来清理一些空间?
感谢!
如上所述,您需要 ssh到您的盒式磁带(你会在Web控制台找到代码 - 在删除按钮旁边),然后 cd到app-root / logs ,然后运行du -sh检查当前目录的维度,在我的情况下文件 php-error.log 为 542M 。您可以使用 rm -f php-error.log安全地将其删除
My quota on openshift has exceeded:
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/EBSStore01-user_home01
1048572 0 1048576 6890 0 80000
I found a different stackoverflow questions that the disk space can be cleaned by 'rhc app-tidy'
But when i run this command i get the following error:
Warning: Gear xxx is using 100.0% of disk quota
Failed to execute: 'control start' for /var/lib/openshift/xxx/mysql
When i run the following command do see which files are using the most space
du -h * | sort -rh | head -50
I get the following ouput:
605M wildfly
320M git/mythings.git/objects
320M git/mythings.git
320M git
317M wildfly/usr/lib/jvm/jdk1.8.0_05
317M wildfly/usr/lib/jvm
317M wildfly/usr/lib
317M wildfly/usr
166M wildfly/usr/lib/jvm/jdk1.8.0_05/jre
165M wildfly/usr/lib/jvm/jdk1.8.0_05/jre/lib
136M wildfly/versions/8
136M wildfly/versions
118M wildfly/versions/8/modules
118M wildfly/usr/lib/jvm/jdk1.8.0_05/lib
118M wildfly/modules
116M wildfly/versions/8/modules/system/layers/base
116M wildfly/versions/8/modules/system/layers
116M wildfly/versions/8/modules/system
116M wildfly/modules/system/layers/base
116M wildfly/modules/system/layers
116M wildfly/modules/system
95M wildfly/versions/8/modules/system/layers/base/org
95M wildfly/modules/system/layers/base/org
59M wildfly/usr/lib/jvm/jdk1.8.0_05/jre/lib/i386
52M mysql/data
52M mysql
49M wildfly/usr/lib/jvm/jdk1.8.0_05/lib/missioncontrol
43M wildfly/usr/lib/jvm/jdk1.8.0_05/lib/missioncontrol/plugins
37M wildfly/versions/8/modules/system/layers/base/org/jboss
37M wildfly/modules/system/layers/base/org/jboss
32M wildfly/usr/lib/jvm/jdk1.8.0_05/lib/visualvm
28M git/mythings.git/objects/76
26M wildfly/usr/lib/jvm/jdk1.8.0_05/jre/lib/ext
26M git/mythings.git/objects/pack
26M git/mythings.git/objects/f6
21M wildfly/usr/lib/jvm/jdk1.8.0_05/lib/visualvm/platform
21M app-root/runtime/repo
21M app-root/runtime
21M app-root
21M app-deployments/2014-08-04_14-34-47.614/repo
21M app-deployments/2014-08-04_14-34-47.614
21M app-deployments
20M wildfly/versions/8/modules/system/layers/base/org/jboss/as
20M wildfly/modules/system/layers/base/org/jboss/as
20M git/mythings.git/objects/ac
20M git/mythings.git/objects/8a
20M git/mythings.git/objects/6e
20M git/mythings.git/objects/69
20M git/mythings.git/objects/21
20M git/mythings.git/objects/12
As you can see the git directory takes a lot of space, but when i try to do 'git gc', i get the following error:
Counting objects: 226, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (192/192), done.
dm-0: write failed, user block limit reached.
fatal: sha1 file '/var/lib/openshift/xxx/git/mythings.git/objects/pack/tmp_pack_ipHspL' write error: Disk quota exceeded
error: failed to run repack
So now i am out of ideas, what can i do to cleanup some space?
Thanks!
As mentioned above you need to ssh to your cartridge (you will find code in web console - next to delete button) and then cd to app-root/logs and then run du -sh to check the dimension of the current dir, in my case the the file php-error.log was 542M. You can safe delete it with rm -f php-error.log
这篇关于'rhc tidy'没有足够磁盘空间时如何在openshift上清理磁盘空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!