Difference between revisions of "Repairing wrongly reported quota by openVZ container"

From Notes_Wiki
m
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb>Troubleshooting_openVZ_issues|Troubleshooting openVZ issues</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Troubleshooting openVZ issues]] > [[Repairing wrongly reported quota by openVZ container]]
=Repairing wrongly reported quota by openVZ container=


It is possible that a openVZ container shows incorrect usage when "df -h" is used inside container.  To verify actual usage one can use:
It is possible that a openVZ container shows incorrect usage when "df -h" is used inside container.  To verify actual usage one can use:
Line 7: Line 6:
</pre>
</pre>
and compare the output with "df -h" used space output.  If the values are incorrect then one can use following steps to get correct quota:
and compare the output with "df -h" used space output.  If the values are incorrect then one can use following steps to get correct quota:
<pre>
<pre>
  vzquota drop 161
vzctl stop <CTID>
  vzquota drop <CTID>
  vzctl set <CTID> --diskspace <soft-limit>:<hard-limit> --save
  vzctl set <CTID> --diskspace <soft-limit>:<hard-limit> --save
  vzctl set <CTID> --diskinodes <soft-limit>:<hard-limit> --save
  vzctl set <CTID> --diskinodes <soft-limit>:<hard-limit> --save
  vzctl set <CTID> --diskquota yes --save
  vzctl set <CTID> --diskquota yes --save
  vzctl restart <CTID>
  vzctl start <CTID>
</pre>
</pre>




Note that if the used space is reported as 0 instead of a wrong value then it is possible that quota is not supported for the filesystem used by /vz.  Check http://wiki.openvz.org/FAQ#What_filesystems_should_I_choose_for_saving_my_containers.3F for list of supported file-systems.
Note that if the used space is reported as 0 instead of a wrong value then it is possible that quota is not supported for the filesystem used by /vz.  Check http://wiki.openvz.org/FAQ#What_filesystems_should_I_choose_for_saving_my_containers.3F for list of supported file-systems.
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Virtualization tools]] > [[OpenvZ]] > [[Troubleshooting openVZ issues]] > [[Repairing wrongly reported quota by openVZ container]]

Latest revision as of 13:10, 24 August 2022

Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > Repairing wrongly reported quota by openVZ container

It is possible that a openVZ container shows incorrect usage when "df -h" is used inside container. To verify actual usage one can use:

du -sh /vz/private/<CTID>

and compare the output with "df -h" used space output. If the values are incorrect then one can use following steps to get correct quota:

 
 vzctl stop <CTID>
 vzquota drop <CTID>
 vzctl set <CTID> --diskspace <soft-limit>:<hard-limit> --save
 vzctl set <CTID> --diskinodes <soft-limit>:<hard-limit> --save
 vzctl set <CTID> --diskquota yes --save
 vzctl start <CTID>


Note that if the used space is reported as 0 instead of a wrong value then it is possible that quota is not supported for the filesystem used by /vz. Check http://wiki.openvz.org/FAQ#What_filesystems_should_I_choose_for_saving_my_containers.3F for list of supported file-systems.



Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > Repairing wrongly reported quota by openVZ container