<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
It doesn't seem to do anything if the container is running:<br>
<br>
<tt>[root@sovereign ~]# du -sch /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt>114G /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# vzctl exec 101 df -h /</tt><tt><br>
</tt><tt>Filesystem Size Used Avail Use% Mounted on</tt><tt><br>
</tt><tt>/dev/ploop42957p1 277G 101G 162G 39% /</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# /usr/sbin/pcompact</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt>Inspect 5120cb33-6817-4888-bd9a-fdbfa87b913e</tt><tt><br>
</tt><tt>Inspect /vz/private/101/root.hdd/DiskDescriptor.xml</tt><tt><br>
</tt><tt>Disk: /vz/private/101/root.hdd/DiskDescriptor.xml</tt><tt><br>
</tt><tt>ploop=288000MB image=115754MB data=108013MB balloon=0MB</tt><tt><br>
</tt><tt>Rate: 2.7 (threshold=10)</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# du -sch /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt>114G /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# vzctl exec 101 df -h /</tt><tt><br>
</tt><tt>Filesystem Size Used Avail Use% Mounted on</tt><tt><br>
</tt><tt>/dev/ploop42957p1 277G 101G 162G 39% /</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# vzctl stop 101</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# /usr/sbin/pcompact</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt>pass4 group:2224 Relocated inodes:0, local:0 extents: 0,
blocks 0</tt><tt><br>
</tt><tt>Starting relocation</tt><tt><br>
</tt><tt>Opening delta /vz/private/101/root.hdd/root.hds</tt><tt><br>
</tt><tt>TRUNCATED: 116 cluster-blocks (121634816 bytes)</tt><tt><br>
</tt><tt>...</tt><tt><br>
</tt><tt>< tons of output ></tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# vzctl start 101</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# du -sch /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt>76G /vz/private/101/root.hdd/</tt><tt><br>
</tt><tt><br>
</tt><tt>[root@sovereign ~]# vzctl exec 101 df -h /</tt><tt><br>
</tt><tt>Filesystem Size Used Avail Use% Mounted on</tt><tt><br>
</tt><tt>/dev/ploop42957p1 277G 57G 207G 22% /</tt><br>
<br>
So I guess my question is am I expect to <i>stop</i> and compact my
containers regularly?<br>
<br>
Thanks,<br>
Chris<br>
<br>
<div class="moz-cite-prefix">On 11/01/2016 02:24 PM, Gena Makhomed
wrote:<br>
</div>
<blockquote
cite="mid:4f1f88ad-1500-31da-c3b4-64106b8e5910@csdoc.com"
type="cite">On 03.10.2016 18:26, Chris James wrote:
<br>
<br>
<blockquote type="cite">I'm running a graphing container on VZ7.
Specifically it's running
<br>
carbon-cache with metrics coming in every minute for a total of
46G of
<br>
stats spread out over 193349 files. This disk space usage of
this
<br>
containers ploop container is regularly blowing up.
<br>
<br>
Today, I ran the following command:
<br>
<br>
prl_disk_tool compact --hdd /vz/private/101/root.hdd
<br>
<br>
This freed up 172GB of disk space.
<br>
<br>
How do I prevent this kind of fragmentation from building up? Am
I
<br>
expected to compact the ploop images on a regular basis?
<br>
</blockquote>
<br>
# man pcompact
<br>
<br>
# man pcompact.conf
<br>
<br>
# cat /etc/cron.d/pcompact
<br>
<br>
</blockquote>
<br>
</body>
</html>