Kevin Pendleton wrote:
So I am having problems getting the new dlimits option working with
util-vserver 0.30.210. First off, there appears to be some differences
between the great flower page configuration compared with this doc on
the linux-vserver.org site:
http://linux-vserver.org/Disk+Limits
The difference being the addition of a subfolder under dlimits. Without
adding a 0 subfolder, all settings were completely ignored. Once the
proper files were inside of the 0 subfolder, the total settings were
applied but the usage settings were not correctly calculated.
The flower page does say /etc/vservers/<vserver-name>/dlimits/<dlimit>.
I saw this error once, "vserver: vdlimit: vc_get_dlimit(): No such
process", but have not seen it again, even after deleting the cache
file. (also the cache file was never recreated after deleting it.)
The error message probably appeared when you stopped the guest for the
first time after adding the limit to the configuration.
The cache is only created after a clean shutdown, and then removed when
you start the guest again.
du -sh testing.com/
691M testing.com/
df -h (inside vserver):
Filesystem Size Used Avail Use% Mounted on
/dev/hdv1 2.0G 40K 1.9G 1% /
none 150M 0 150M 0% /tmp
(before deleted)
cat /etc/vservers/testing.com/cache/dlimits/737_vservers_testing.com_:
space_used=4
inodes_used=2
If I use the following script on the context it works fine:
/usr/sbin/vdlimit --xid 737 --set space_total=2097152 --set
space_used=`du -s /vservers/testing.com/ | awk '{print $1}'` --set
inodes_total=2097152 --set inodes_used=`ls -1aRi /vservers/testing.com/
| awk '/^[0-9]+ / { print $1 }' | sort -u | wc -l` --set reserved=5
/vservers/testing.com/
df -h (inside vserver):
Filesystem Size Used Avail Use% Mounted on
/dev/hdv1 2.0G 691M 1.3G 36% /
none 150M 0 150M 0% /tmp
Are you sure all the files in the guest are tagged with the correct xid?
vdu checks the xid of the files to make sure it doesn't sum unified
files, and that the files will actually be subtracted from the usage
when they're removed.
--
Daniel Hokka Zakrisson
GPG id: 06723412
GPG fingerprint: A455 4DF3 990A 431F FECA 7947 6136 DDA2 0672 3412
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver