Home » General » Support » [solved] nfs mount vs. mount --bind
[solved] nfs mount vs. mount --bind [message #26347] |
Mon, 21 January 2008 23:25 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
yahbluez
Messages: 18 Registered: August 2007 Location: Germany
|
Junior Member |
|
|
Gents,
my question is.
What is better mounting an NFS share into each VE
or
mounting it on the host and bind it into the root after starting the VE?
Better means here where will the servers scale to more IO performance. I don't know where the buffering happens always on the host or in the VE when mountig inside the VE?
I think mounting inside VE has more sex but when the mount --bind gives more performnce or saves RAM i will prefer that.
Any idea?
with best regards
yahbluez
[Updated on: Fri, 25 January 2008 11:09] Report message to a moderator
|
|
|
|
|
|
Re: nfs mount vs. mount --bind [message #36534 is a reply to message #36533] |
Mon, 29 June 2009 10:59 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
freedev
Messages: 3 Registered: June 2009 Location: Milan
|
Junior Member |
|
|
Hi maratrus,
I executed the following commands:
[root@svilpar2 ~]# mount /usr/local/storage/disco1/
[root@svilpar2 ~]# vzctl start 1006
Starting Container ...
mount --bind /usr/local/storage/disco1 /vz/root/1006/usr/local/sitipersonali/disco1
Container is mounted
Setup slm memory limit
Setup slm subgroup (default)
Setting devperms 20002 dev 0x7d00
Adding port redirection to Container(1): 4643 8443
Adding IP address(es) to pool:
Adding IP address(es): XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
Hostname for Container set: linweb01.xoom.it
File resolv.conf was modified
Container start in progress...
[root@svilpar2 ~]#
[root@svilpar2 ~]# cat /proc/mounts/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda5 /vz ext3 rw,noatime,data=ordered 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/etc/auto.misc /misc autofs rw,fd=6,pgrp=7159,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,fd=12,pgrp=7159,timeout=300,minproto=5,maxproto=5,indirec t 0 0
/dev/sda2 /home ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
sysfs /sys sysfs rw 0 0
XXX.XXX.XXX.XXX:/BASEDIR/DISCO1 /usr/local/storage/disco1 nfs rw,vers=3,rsize=8192,wsize=8192,soft,proto=tcp,timeo=600,ret rans=2,sec=sys,addr=151.99.197.39 0 0
XXX.XXX.XXX.XXX:/BASEDIR/DISCO1 /vz/root/1006/usr/local/sitipersonali/disco1 nfs rw,vers=3,rsize=8192,wsize=8192,soft,proto=tcp,timeo=600,ret rans=2,sec=sys,addr=151.99.197.39 0 0
[root@svilpar2 ~]# vzctl stop 1006
Stopping Container ...
Container was stopped
umount /vz/root/1006/usr/local/sitipersonali/disco1
Container is unmounted
[root@svilpar2 ct-scripts]# cat /proc/mounts
/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda5 /vz ext3 rw,noatime,data=ordered 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/etc/auto.misc /misc autofs rw,fd=6,pgrp=7159,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,fd=12,pgrp=7159,timeout=300,minproto=5,maxproto=5,indirec t 0 0
/dev/sda2 /home ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
sysfs /sys sysfs rw 0 0
as you can see also the NFS is disappeared!!!
[root@svilpar2 ct-scripts]# vi /vz/private/1006/scripts/umount
#!/bin/bash
BASEDIR=/usr/local/sitipersonali
HWDIR=/usr/local/storage
for i in `ls $HWDIR`; do
if ! [ -d /vz/root/$VEID/$BASEDIR/$i ];
then
echo
fi
echo umount /vz/root/$VEID$BASEDIR/$i
umount /vz/root/$VEID$BASEDIR/$i
done
exit 0
~
[root@svilpar2 ct-scripts]# vi /vz/private/1006/scripts/mount
#!/bin/bash
BASEDIR=/usr/local/sitipersonali
HWDIR=/usr/local/storage
for i in `ls $HWDIR`; do
if ! [ -d /vz/root/$VEID$BASEDIR/$i ];
then
echo mkdir -p /vz/root/$VEID$BASEDIR/$i;
mkdir -p /vz/root/$VEID$BASEDIR/$i;
fi
echo mount --bind $HWDIR/$i /vz/root/$VEID$BASEDIR/$i;
mount --bind $HWDIR/$i /vz/root/$VEID$BASEDIR/$i;
done
~
|
|
|
|
|
Re: nfs mount vs. mount --bind [message #36543 is a reply to message #36542] |
Tue, 30 June 2009 04:51 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
maratrus
Messages: 1495 Registered: August 2007 Location: Moscow
|
Senior Member |
|
|
Hi,
Quote: |
anyway I receive an error when the umount is executed:
|
Yes, I explained the reason in the previous post. So, to get rid of the error message you mustn't create a VEs umount script. VE umounts this bind mount in one of the init scripts.
|
|
|
Goto Forum:
Current Time: Tue Sep 10 22:45:41 GMT 2024
Total time taken to generate the page: 0.04991 seconds
|