Wednesday 27 May 2015

Openvz node full, 100%

[root@node~]# df -Th
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda5      ext4  1.1T  1.1T 1001M 100% /
/dev/sda2      ext4  2.9G  4.6M  2.9G   1% /tmp
/dev/sda1      ext4  479M  184M  295M  39% /boot


Find the container and their disk usage
============================

find /vz/private/  -type f -size +500000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

/vz/private/402/root.hdd/root.hdd: 15G
/vz/private/367/root.hdd/root.hdd: 22G
/vz/private/448/root.hdd/root.hdd: 6.2G
/vz/private/392/root.hdd/root.hdd: 50G
/vz/private/391/root.hdd/root.hdd: 18G
/vz/private/436/root.hdd/root.hdd: 11G
/vz/private/432/root.hdd/root.hdd: 1.4G
/vz/private/416/root.hdd/root.hdd: 16G
/vz/private/387/root.hdd/root.hdd: 50G
/vz/private/386/root.hdd/root.hdd: 20G
/vz/private/405/root.hdd/root.hdd: 23G
/vz/private/443/root.hdd/root.hdd: 8.9G
/vz/private/427/root.hdd/root.hdd: 31G

===================
Delete unwanted space using files like backup files
===========
 for i in `cat /proc/vz/veinfo | awk '{print $1}'|egrep -v '^0$'`; do echo "Container $i"; vzctl exec $i find . -name "*backup*.tar.gz" -type f -delete; done
===========

Find the space usage in containers  >> vzctl enter container ID then
==========
 find /home -type f -size +500000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'


=========================

If the issue still not under control try the below command via node on the containers that have space issues
====
Run this command vzctl compact ctid
===================================


Last method >> migrate any two containers to some other location using openvz live migration
======

https://documentation.solusvm.com/plugins/servlet/mobile#content/view/557438 
 

No comments:

Post a Comment