OpenVZ Forum


Home » Mailing lists » Users » post start host side configuration for a vps
post start host side configuration for a vps [message #8599] Tue, 28 November 2006 20:48 Go to next message
ajneil is currently offline  ajneil
Messages: 11
Registered: November 2006
Location: Fairfax
Junior Member
I would like to have some directories mounted within a VPS from the host
node. I can do this using a bind mount from the host, however I have not
found any configurable way to achieve this automatically. Ideally these
mounts should be mounted before the VPS starts any services. Anyone have
any suggestions?


rgds Alastair Neil
Re: post start host side configuration for a vps [message #8605 is a reply to message #8599] Wed, 29 November 2006 08:28 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Alastair Neil wrote:
> I would like to have some directories mounted within a VPS from the
> host node. I can do this using a bind mount from the host, however I
> have not found any configurable way to achieve this automatically.
> Ideally these mounts should be mounted before the VPS starts any
> services. Anyone have any suggestions?
You can create script /etc/vz/conf/101.mount
This script will be executed before VE start, so you can add mounts there.

Typical content of 101.mount:
#! /bin/sh
mount -n -o bind,ro /shared/directory /vz/root/101/shared

HTH,
Vasily.
>
>
> rgds Alastair Neil
>
>
> ------------------------------------------------------------ ------------
>
Re: post start host side configuration for a vps [message #8612 is a reply to message #8605] Wed, 29 November 2006 10:08 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Vasily Tarasov wrote:
> Alastair Neil wrote:
>
>> I would like to have some directories mounted within a VPS from the
>> host node. I can do this using a bind mount from the host, however I
>> have not found any configurable way to achieve this automatically.
>> Ideally these mounts should be mounted before the VPS starts any
>> services. Anyone have any suggestions?
>>
> You can create script /etc/vz/conf/101.mount
> This script will be executed before VE start, so you can add mounts there.
>
> Typical content of 101.mount:
> #! /bin/sh
> mount -n -o bind,ro /shared/directory /vz/root/101/shared
>
More details are in OpenVZ User's Guide, around page 100 or so.
The guide itself is at http://download.openvz.org/doc/ (in case you
missed it).

Regards,
Kir.
Re: post start host side configuration for a vps [message #8624 is a reply to message #8612] Wed, 29 November 2006 16:08 Go to previous message
ajneil is currently offline  ajneil
Messages: 11
Registered: November 2006
Location: Fairfax
Junior Member
On 11/29/06, Kir Kolyshkin <kir@openvz.org> wrote:
>
> Vasily Tarasov wrote:
> > Alastair Neil wrote:
> >
> >> I would like to have some directories mounted within a VPS from the
> >> host node. I can do this using a bind mount from the host, however I
> >> have not found any configurable way to achieve this automatically.
> >> Ideally these mounts should be mounted before the VPS starts any
> >> services. Anyone have any suggestions?
> >>
> > You can create script /etc/vz/conf/101.mount
> > This script will be executed before VE start, so you can add mounts
> there.
> >
> > Typical content of 101.mount:
> > #! /bin/sh
> > mount -n -o bind,ro /shared/directory /vz/root/101/shared
> >
> More details are in OpenVZ User's Guide, around page 100 or so.
> The guide itself is at http://download.openvz.org/doc/ (in case you
> missed it).
>
> Regards,
> Kir.
>

Ahh I see it it is on page 88 in the pdf I have. Thanks for the pointer.
Previous Topic: network broadcast packets
Next Topic: vzmigrate error
Goto Forum:
  


Current Time: Fri Oct 18 04:50:40 GMT 2024

Total time taken to generate the page: 0.05682 seconds