OpenVZ Forum


Home » General » Support » AutoFS/NFS
AutoFS/NFS [message #4960] Fri, 04 August 2006 19:42 Go to next message
bkosick is currently offline  bkosick
Messages: 4
Registered: August 2006
Junior Member
Hi All,

I have a non-VZ NFS server with a few exports that I use autofs/automount to mount /home and /software as needed. I am having issues getting autofs to work properly on a VZ-VPS

/usr/sbin/automount --timeout=60 /home file /etc/auto.home
[root@qavmXX ~]# !ps
ps ax | grep auto
27830 ttyp0 S 0:00 /usr/sbin/automount --timeout=60 /home file /etc/auto.home
27835 ttyp0 S+ 0:00 grep auto
[root@qavmXX ~]# ls -l /home/bkosick
ls: /home/bkosick: No such file or directory

There's no corresponding error in /var/log/messages
autofs works just fine on the HW node.

Anyone run into this before? I've read that VZ has issues with NFS server (SW-Soft thinks that NFS is too unstable under linux!) but that the client should work.

[Edit]
The Node is running FC5/2.6.16-1.2111_FC5.026test012smp the VPS is running RHEL4

Also, I just read a threat stating that there are 2-3 kernel patches to apply before NFS clients will work. Is this true? and if so where do I get them?

[Updated on: Fri, 04 August 2006 20:36]

Report message to a moderator

Re: AutoFS/NFS [message #4972 is a reply to message #4960] Mon, 07 August 2006 06:20 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
1. In OpenVZ kernel from rpm autofs is off, so
if you want to use autofs on HOST with OpenVZ you should
recompile your kernel with CONFIG_AUTOFS_FS, CONFIG_AUTOFS4_FS
parameters on.
2. However autofs (and nfs) are not virtualized,
so you can't use it inside VE.
3. You can mount autofs somethere on HOST,
and then do --bind mount inside any VE you wish.
May be such scenario passes for you.
4. Yeap, there were some patches here at forum,
that makes autofs/nfs available in VE. Try to use search.
However, after such patching you kernel becomes unsecure.

HTH, vass.

[Updated on: Mon, 07 August 2006 06:21]

Report message to a moderator

Re: AutoFS/NFS [message #4984 is a reply to message #4972] Mon, 07 August 2006 14:40 Go to previous messageGo to next message
bkosick is currently offline  bkosick
Messages: 4
Registered: August 2006
Junior Member
Hi,

Are the --bind and mount/unmount scripts capable of mounting/unmounting on demand inside the VPS's? The reason I'm using autofs, is that I do not want the extra overhead, of having the NFS shares mounted full time/nor the problems associated with NFS when something dies/goes wrong (Client lockups etc).

I used Virtuozzo extensively (probably around 300-400 VPS's/two full racks of HW nodes) at my last job and was extremely pleased with it. But now I have a different set of requirements.... and if I cannot mount/unmount the NFS shares dynamically, OpenVZ/Virtuozzo does not meet my needs.

Thanks,
Brian
Re: AutoFS/NFS [message #5000 is a reply to message #4984] Tue, 08 August 2006 05:23 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Well... I meant slightly different scenario:

On host node you are mounting autofs on, say,
/mnt/nfsshares/nfs1, /mnt/nfsshares/nfs2, etc.

Then do
mount --bind /mnt/nfsshares/nfs1/ /vz/root/100/home/
mount --bind /mnt/nfsshares/nfs2/ /vz/root/101/home/
....

I suppose, appropriate nfs mount will be automounted only when you are using /home inside appropriate VE and automatically unomunted after some time... Well, usual autofs.

However, it might not work for various reasons:
1) --bind "get" nfs and it is always mounted
2) atomounter don't recieve a "signal" from VE to mount an NFS
partion (this is very probably).

So, it's necessary to check all these stuff! Smile
If you'll do it - please post your results here. Rolling Eyes
I'll try to do something like that in the near future...

Thanks.
Re: AutoFS/NFS [message #5020 is a reply to message #5000] Tue, 08 August 2006 13:10 Go to previous messageGo to next message
bkosick is currently offline  bkosick
Messages: 4
Registered: August 2006
Junior Member
Hi,

Thanks for your reply's I'll go ahead and give it a hot today, and let you know the results.

Brian
Re: AutoFS/NFS [message #5061 is a reply to message #5000] Wed, 09 August 2006 18:28 Go to previous message
bkosick is currently offline  bkosick
Messages: 4
Registered: August 2006
Junior Member
OK,

I've tested it out, and it doesn't seemd to work very well. I reported earlier that the autofs worked on the HW node with the fedora kernel... Well it does kinda...

For example. After starteing autofs on the HW node, you can do a "ls /home/bkosick" and it works fine. However if you immediately do the same thing on another user "ls /home/lchamp". It comes back with "No such file or directory". Wait a few minutes, and do the "ls /home/lchamp" command it suddenly works. Note that /home/bkosick is still mounted.

so with these still mounted, I perform the mount --bind command

mount --bind /home /vz/root/334/home

then enter the VPS, vzctl enter 334

and do an "ls /home/bkosick" it comes back with no such file or directory.

ls bkosick
ls: bkosick: No such file or directory
-bash-3.00# ls /home/bkosick
ls: /home/bkosick: No such file or directory
-bash-3.00# cd /home/bkosick
-bash-3.00# ls
ls: .: No such file or directory

Doh!
Previous Topic: *SOLVED* Problem starting VPS
Next Topic: AMD64, FreeVPS and CPU
Goto Forum:
  


Current Time: Sat Jul 13 16:20:09 GMT 2024

Total time taken to generate the page: 0.02287 seconds