Re: Private disk partitions and disk games [message #4240 is a reply to message #4212] |
Mon, 03 July 2006 16:03 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
rollinw
Messages: 25 Registered: June 2006 Location: Santa Barbara, California
|
Junior Member |
|
|
My assumption is that disk quota is allocated from partitions that BELONG to the hardware node (node0), based on the fact that this was the disk space defined when node0 was installed. Perhaps I am wrong; i,e., that node0 claims any disk partitions (both local and foreign) it can see and tries to assign quotas to all of them.
Although my new installation on node0 did try to take over swap spaces from 2 other linux installations on my system, I got rid of the extra 2 by editing /etc/fstab. It is true that all partitions with linux-compatible filesystems are visible in /proc/partitions. However, I do not see how node0 could allocate disk quotas to partitions node0 does not have mounted. Let's assume IT DOES NOT (though I could be wrong).
In a clean, theoretical virtualization concept, node0 owns all resources within its own execution environment and shares these resources with its VEs. Since it controls all the hardware, it could also mount any other disk partitions (i.e., partitions on "foreigh disks" outside its own installation) and share these as well. Having node0 control all resources is probably the purest and most secure use of OpenVZ.
Not all uses of OpenVZ need to be or want to be that theoretically pure. There are special cases a VE MUST have direct access to some of the hardware resources. OpenVZ provides a way for node0 to allocate hardware to a VE. This is through the utility vzctl. There are command modes in vzctl that activate specific kinds of hardware access in a VE. The results of some of these commands are stored in a VE's VEID.conf file. Examples of vzctl commands are:
--netdev_add (allows the VE direct access to a net device)
--devnodes (gives the VE direct access: r,w,rw, none--to a device)
Note: I have made this work with "foreign" disks. In the near future I may need to try it with a CDROM and/or a floppy drive.
--devices (gives VE ability to control devices; e.g., to partition disks and create filesystems on them)
Note: I couldn't find this one in the vzctl man pages, but it is described in the Advanced Tasks section of the User Guide.
Besides these hardware control options, there is also the vzctl command,
--capability
that gives a VE access to many of its internal system options.
This is longer than I intended, so I will stop.
rollinw
|
|
|