OpenVZ Forum


Home » General » Support » Is NFS virtualized fully?
Re: Is NFS virtualized fully? [message #2640 is a reply to message #2635] Thu, 13 April 2006 06:15 Go to previous messageGo to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Suggested by Babyface on IRC:

<Babyface> mount --bind /path /to/path
<Babyface> for example
<dowdle> That command is within the VPS?
<Babyface> mount --bind /nfsroot /vz/root/<vpsid>/mnt
<Babyface> no on hostnode
<dowdle> Ok, cool. Thanks I'll try that now.
<Babyface> and vps must be started before
<Babyface> or mounted
<Babyface> so better to create some kind of /etc/sysconfig/vz-scripts/<vpsid>.mount and .umount files Smile
<Babyface> then on vps startup it is automatically mounted
<dowdle> Wow... that worked like instantly! Thanks very much.
<dowdle> Ok, sure... about the mount and unmount scripts... as I want that to be automatic. So, if I create scripts with those names, they will be automati
cally parsed upon VPS startup?
<Babyface> yes
<dowdle> Right on.
<dowdle> Thanks Babyface!
<-- ckoehn has quit ("7:42pm| (@DenisGe) ich schneid nie wieder samstags nachts 2 uhr haare alleine")
<Babyface> mount file should look like
<Babyface> #!/bin/bash
<Babyface> # if one of these files does not exist then something is really broken
<Babyface> [ -f "${VE_CONFFILE}" ] || exit 1
<Babyface> # mount nfsroot.
<Babyface> mount --bind /nfsroot /vz/root/<vpsid>/mnt
<Babyface> exit ${?}
<Babyface> and must be executable
<Babyface> umount like
<Babyface> #!/bin/bash
<Babyface> # if one of these files does not exist then something is really broken
<Babyface> [ -f "${VE_CONFFILE}" ] || exit 1
<Babyface> # umount nfsroot.
<Babyface> umount /vz/root/<vpsid>/mnt
<Babyface> exit ${?}
<Babyface> also executable Smile


http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using the same IP as VPS0 (HOST)
Next Topic: vps memory leak
Goto Forum:
  


Current Time: Tue Aug 06 02:59:05 GMT 2024

Total time taken to generate the page: 0.03285 seconds