I am following the PDF User Guide and have set up for example VPSID 101. I have set --diskspace --diskinodes, and --quotatime. When I perform: # vzctl exec 101 df Filesystem 1K-blocks Used Available Use% Mounted on [root@redhat /]# If I perform: # df /vz Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda3 74714332 2161532 68757444 4% / If I do df inside VPS 101 it is empty also. I have tried restarting VPS 101 with the same results. What am I missing or doing wrong?
Try to add simfs / simfs rw 0 0 into your /etc/mtab on the VPS (probably in rc.local or somewhere else). It helped me when I had similar issue
Which OS template do you use? Please, check vzctl exec 101 ls -al /etc/mtab output By default, it should be symlink to /proc/mounts
After creating a CentOS-4 VPS by following the steps outlined in the PDF userguide, mtab was a regular file with this content: none /dev/pts devpts rw 0 0 We don't get df output with that, so removing that file and creating the symlink fixes things up. rm -f /etc/mtab ln -s /proc/mounts /etc/mtab Once the symlink is created, df from inside the VPS correctly displays the amount of disk space free. Example: [root@vps ~]# df -h Filesystem Size Used Avail Use% Mounted on simfs 1.0G 413M 612M 41% /
You could add # set /etc/fstab $VZCTL exec2 $VEID 'echo "simfs / simfs rw 0 0" >> /etc/fstab' to the install-post script in the /vz/template/<DIST>/config so that the cache repository is adjusted and every new initialized VPS is configured correctly.
This is a known bug which Bugzilla has been filed. To correct the problem and your template see this post: http://forum.openvz.org/index.php?t=msg&th=42&start= 0& Good Luck!
Just for info: it will be fixed in the upcoming updated OS templates this or next week when we plan to release x86-64 version also.