OpenVZ Forum


Home » General » Support » --private vs --root
--private vs --root [message #45236] Thu, 16 February 2012 16:23 Go to next message
jampa
Messages: 4
Registered: February 2012
Junior Member
If we want to make available a partition from host node (HN) to a container which option, private or root, to use and how?

I have a /root1 and /root2 partitions available in HN that I want to use for containers 101 and 102. I tried using as:
vzctl create 101 --root /root1 ...
it didn't work (ie the install proceeded on the usual /vz/private/101), then I tried to use it as:
vzctl create 101 --private /root1 ...
That seemed to have created the container's file system on HN's /root1, but for some reason either during a poweroff or reboot I lost the file system from /root1.

It is not clear as to how these options can be used and how are they related to each other, specially in regard to making a HN partition available for a container's root file system use.

Thanks
Re: --private vs --root [message #45239 is a reply to message #45236] Thu, 16 February 2012 20:35 Go to previous message
jampa
Messages: 4
Registered: February 2012
Junior Member
I have retried --root /root1 and --private /root1 and this is what I observed.

1. If I pass --root /root1, then what is happening is that container, as usual, is getting setup under /vz/private/101 and /root1 is not used during the creation. However, if the container 101 is started, VZ seems to mount the /vz/private/101 onto /root1 so that the /root1 is now available to the host node.

You stop the container access to it goes away, but interestingly file system 'space' seem to persist on /root1 in 'invisible' form. You can claim back the space only when you restart the computer.

So, --root option is to make the container file system visible to host node.

2. If I pass --private /root1, I get:
Private area already exists in /root1
Creation of container private area failed

So, I am clearly missing something very basic. In the first place, is what I am trying makes sense? Is it a good idea to set aside a partition for container's root file system? If it is, how can I have a the container setup on a partition available on the host node?

Thanks!

[Updated on: Thu, 16 February 2012 20:49]

Report message to a moderator

Previous Topic: Server Inaccessible
Next Topic: Is the NFS buffer cache shared between OpenVZ containers
Goto Forum:
  


Current Time: Thu Oct 17 10:47:46 GMT 2024

Total time taken to generate the page: 0.07639 seconds