centos 管理之 openvz云 quota

跟着俺的步骤来~~首先要装好openvz. 生成一个新的虚拟机~为虚拟化云计算做铺垫~

接下来.要进行VPS硬盘大小的分配..


To set disk space, run the following commands:

  vzctl set CTID --diskspace $SoftLimit$:$HardLimit$ --savevzctl set 101 –diskspace 6G:7G –save

You could verify the space available with this command (ie : CTID =101)

[host-node]# vzctl exec 101 df -hIf you want remove disk quota:

DISK_QUOTA=no

-----例子----不需要重启.可以即时分配.但是缩减就有点问题了!------

[root@realserver2 ~]# vzctl set 102 --diskspace 3G:4G --save
Saved parameters for CT 102

[root@realserver2 ~]# vzctl exec 102 df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs            3.0G  598M  2.5G  20% /
none                  125M  4.0K  125M   1% /dev

--------------------------
注意:
Filesystem dependency

If your host filesystem is not ext2/3 (like XFS) the disk quotas will not work inside containers.

所以要做成ext3的才行哦..
---------------
参考:http://wiki.openvz.org/Disk_quota
 openvz user guide (pdf)

posted @ 2009-05-20 21:07  云中哈哈  阅读(487)  评论(0编辑  收藏  举报