OpenVZ Forum


Home » General » Support » WORKAROUND - Does AutoFS work in OpenVZ yet?
WORKAROUND - Does AutoFS work in OpenVZ yet? [message #21652] Fri, 12 October 2007 16:20 Go to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Hello Everyone,

I'm trying to get NIS/AutoFS/NFS working here on Centos5 VPSs but it's not working out. Per a thread dated August 2006, it said that AUTOFS hadn't been virtualized yet.

http://forum.openvz.org/index.php?t=tree&goto=4960&& amp; amp;srch=autofs#msg_4960

Has this issue been fixed?



Looking at the most current Centos5 kernel configuration, AutoFS4 *is* a module and autofs works fine in the machine VPS (VPS#0).


http://download.openvz.org/kernel/branches/rhel5-2.6.18/028s tab045.1/configs/kernel-2.6.18-i686.config.ovz
--
. . .
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
. . .
--

The machine is running the current OpenVZ kernel, fully patched, etc.



When I start a VPS and autofs starts up, I see:
--
Oct 11 19:11:56 fruitpie-A automount[21693]: Starting automounter version 5.0.1-0.rc2.43.0.2, master map auto.master
Oct 11 19:11:56 fruitpie-A automount[21693]: using kernel protocol version 5.00
Oct 11 19:11:56 fruitpie-A automount[21693]: do_mount_autofs_indirect: failed to create autofs directory /misc
Oct 11 19:11:56 fruitpie-A automount[21693]: handle_mounts: mount of /misc failed!
Oct 11 19:11:56 fruitpie-A automount[21693]: master_do_mount: failed to startup mount
Oct 11 19:11:56 fruitpie-A automount[21693]: master_read_master: no mounts in table
--


When a remote user tries to log into a VPS, the authetication (NIS) works but they can't get into their homedir:
--
dranch@fruitpie-a's password:
Last login: Thu Oct 11 19:11:43 2007 from dolly-centos5
Could not chdir to home directory /homes/dranch: No such file or directory
--





The OpenVZ configuration is fairly basic:

1. I'm using the posted Centos5 i686 "default" template to run three VPSs

2. My VPS configuration is pretty basic. The only thing that might be a little advanced is the hardware node has (4)NICs. eth0 is for the management network and the remaining three are
mapped directly into a VPS for dedicated use. Everything is fine as the VPSs can "ypcat" the various NIS maps, SSH around, etc. It's just
--
ORIGIN_SAMPLE="pvl.basic"
OSTEMPLATE="centos-5-i386-default"
NAME="fruitpie-A"
HOSTNAME="fruitpie-A"
IP_ADDRESS="10.159.16.102"
NAMESERVER="172.17.28.100 172.17.28.101"
NETDEV="eth1"
--

Thoughts?

[Updated on: Fri, 02 November 2007 17:27]

Report message to a moderator

Re: Does AutoFS work in OpenVZ yet? [message #21840 is a reply to message #21652] Tue, 16 October 2007 20:51 Go to previous messageGo to next message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
Quote:

I'm trying to get NIS/AutoFS/NFS working here on Centos5 VPSs but it's not working out. Per a thread dated August 2006, it said that AUTOFS hadn't been virtualized yet.

Has this issue been fixed?


I'd like to know the answer to this too. I know somebody else trying to make autofs work.

I've been using the amd automounter instead of autofs. It works with the 2.6.18-ovz028stab039.1-smp kernel (vanilla 2.6.18), but NOT with the 2.6.18-8.1.8.el5.028stab039.1 kernel (RHEL 5 2.6.18).

NIS works fine. NFS hard mounts work fine.

dranch: you say you are using the "latest" kernel. Which tree? There are several latest kernels.


E Frank Ball efball@efball.com
Re: Does AutoFS work in OpenVZ yet? [message #21852 is a reply to message #21840] Wed, 17 October 2007 04:58 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
This is using the

http://download.openvz.org/kernel/branches/rhel5-2.6.18/028s tab045.1/ovzkernel-2.6.18-8.1.14.el5.028stab045.1.i686.rpm

kernel. It's interesting that amd works for you in the patched vanilla kernel but autofs doesn't. I'm actually very surprised how little traffic this thread has received as NIS/NFS/AutoFS is a very common Linux configuration in the Enterprise.

I hope this can be solved pretty quickly or I might have to revert back to Xen and all it's "pciback" hacks. Blech.

Anyone? HELP!

--David
Re: Does AutoFS work in OpenVZ yet? [message #21894 is a reply to message #21840] Wed, 17 October 2007 15:50 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
So I'd like to set something working so I guess I'll try your approach until I hope this can be fixed. A few questions if I may:

1. Did you take a vanilla 2.6.18.1 kernel and applied the OpenVZ patches or did you use a linux-2.6.18.8 vanilla kernel and patched it?

2. On the Centos5 copy running on the base machine, are you using autofs there or are you using AMD on the base?

3. I can't say I've used AMD before. Does it "just" work like autofs or do you need to configure it? Any pointers or URLs?

Any other tips?

Btw.. thanks for posting this workaround! I don't have a preference on the automounter though I don't like the idea of having to maintain kernels again
Re: Does AutoFS work in OpenVZ yet? [message #21900 is a reply to message #21894] Wed, 17 October 2007 18:00 Go to previous messageGo to next message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
dranch wrote on Wed, 17 October 2007 11:50

So I'd like to set something working so I guess I'll try your approach until I hope this can be fixed. A few questions if I may:

1. Did you take a vanilla 2.6.18.1 kernel and applied the OpenVZ patches or did you use a linux-2.6.18.8 vanilla kernel and patched it?


I downloaded the kernel from openvz. I'm currently using 2.6.18-ovz028stab039.1-smp

Quote:

2. On the Centos5 copy running on the base machine, are you using autofs there or are you using AMD on the base?


My base machine is Enterprise 4. My VMs are CentOS 4. amd is running on both.

Quote:

3. I can't say I've used AMD before. Does it "just" work like autofs or do you need to configure it? Any pointers or URLs?


amd is not a simple "it just works" solution. I'm using this at work, and we use amd here not autofs (it's a really old network that used to be all HP-UX). The NFS maps for amd are distributed via NIS. I didn't setup the network, or the NIS servers, or the file servers, just my clients.



E Frank Ball efball@efball.com
Re: Does AutoFS work in OpenVZ yet? [message #21906 is a reply to message #21900] Wed, 17 October 2007 20:04 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Are you using a RHEL4 kernel configuration against a patched vanilla 2.4.18 codebase or did you configure the kernel options manually? Ideally, I'd like to keep this machine as "stock" as possible.


About amd, at my work, the auto.net, etc. mounter files are also distributed via NIS which is a pretty good solution.

Anyway.. I'll give this a try though I think I need to send a message off to the developer list to see if anyone is looking at this.

--David
Re: Does AutoFS work in OpenVZ yet? [message #21907 is a reply to message #21906] Wed, 17 October 2007 20:36 Go to previous messageGo to next message
efball is currently offline  efball
Messages: 41
Registered: September 2006
Location: Santa Rosa, California
Member
dranch wrote on Wed, 17 October 2007 16:04

Are you using a RHEL4 kernel configuration against a patched vanilla 2.4.18 codebase or did you configure the kernel options manually? Ideally, I'd like to keep this machine as "stock" as possible.


Neither. I didn't compile a kernel, I downloaded the kernel from the openvz yum repository.


E Frank Ball efball@efball.com
Re: Does AutoFS work in OpenVZ yet? [message #21908 is a reply to message #21652] Wed, 17 October 2007 20:55 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
When that original post was written, NFS mounts inside of a VPS wasn't working so well. Now that seems to be working fairly well... at least it is for me... on CentOS 5 host node and CentOS 5 based VPSes.

For specifics on how to make this work, see:

http://wiki.openvz.org/NFS

If you haven't gone through that, it ain't going to work.

So far as autofs goes, if it doesn't have to load a kernel module to work and it doesn't use kernel threads (and it doesn't in both of those cases I believe), it has the potential to work. OpenVZ is mostly for server virtualization and I have to wonder why not use persistant NFS mounts rather than autofs dynamic ones? I use autofs for NFS mounts for (non-virtualized) student lab machines and for some workstations but for servers, why use autofs? Perhaps you have a good reason?

NIS should work fine.

I've have problems getting NFS working inside of a VPS on CentOS 4 based systems... so I'm not sure that is working... but in any event if you can't get it to work from the VPS, the alternative is to get it working on the host node and then bind mount it into the VPS space.

Perhaps the reason there hasn't been a lot of discussion on this topic here in the forum is because of the existence of the wiki page?!?


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: Does AutoFS work in OpenVZ yet? [message #21910 is a reply to message #21908] Wed, 17 October 2007 21:14 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
In my specific case, I have ~100 core developers and QA folk with potentially 1000s of random people from abroad that might need to log into any VPS and it's very valuable to give them access to their home directory. Ninding the static mounts into the various VPSes isn't going to scale and it's a nightmare to manage as people come and go, etc.

Anyway.. following your recommended NFS Wiki link, I meet all the requirements and manual NFS does work within the VPS. Just automounting doesn't. Posted in this thread, it sounds like the use of AMD with a OpenVZ patched vanilla 2.6.18 kernel works. To me, it sounds like a specific issue with autofs, the RHEL kernel flavor of 2.6.18, and at least the 2.6.18-8.1.14.el5.028stab045.1 OpenVZ patches.

Looking on the DEV list, there were some specific AutoFS patches
submitted back in February 2007 but I don't know if they are specific to this issue or if they were integrated:

http://forum.openvz.org/index.php?t=msg&goto=17758&& amp;srch=autofs#msg_17758

--David
Re: Does AutoFS work in OpenVZ yet? [message #21922 is a reply to message #21910] Wed, 17 October 2007 22:47 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Forgive my ignorance... but I don't think autofs really has much that is kernel specific. I think it is basically the automating of mounting. If you can manually mount something, it should work with autofs... if autofs is configured properly. Now having said that, I've not used autofs in a VPS.

I do understand your reason for using it... thanks for explaining.

Do you wanting to mount individual home dirs? Or can you just mount /home? If that later, it would mean a lot less mounts, right?



--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: Does AutoFS work in OpenVZ yet? [message #21925 is a reply to message #21922] Wed, 17 October 2007 23:37 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Regardless of it being a kernel or OpenVZ VPS issue, autofs doesn't work for the automounting of user's NFS-based home directories in a VPS.

The issue noted in my original post is that the parent directories that are usually created from the auto.net automounter maps aren't being properly created in the VPS. My original example only showed that the /misc mount point wasn't being created. Actually, MANY directories fail and even if I manually pre-create these directories, it doesn't help


Oct 16 15:33:53 fruitpie-A ypbind: bound to NIS server ns2.dude.net
Oct 16 15:34:00 fruitpie-A automount[15950]: Starting automounter version 5.0.1-0.rc2.43.0.2, master map auto.master
Oct 16 15:34:00 fruitpie-A automount[15950]: using kernel protocol version 5.00
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /misc
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /misc failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /net
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /net failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.home-adp not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /adp-share
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /adp-share failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.adpdev not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /host
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /host failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.local not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /local
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /local failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.vols not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /volume
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /volume failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.homes not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /homes
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /homes failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: read_file_source_instance: file map /etc/auto.homes not found
Oct 16 15:34:00 fruitpie-A automount[15950]: do_mount_autofs_indirect: failed to create autofs directory /home-shared
Oct 16 15:34:00 fruitpie-A automount[15950]: handle_mounts: mount of /home-shared failed!
Oct 16 15:34:00 fruitpie-A automount[15950]: master_do_mount: failed to startup mount
Oct 16 15:34:00 fruitpie-A automount[15950]: master_read_master: no mounts in table



Re: Does AutoFS work in OpenVZ yet? [message #22013 is a reply to message #21925] Thu, 18 October 2007 14:41 Go to previous messageGo to next message
gblond is currently offline  gblond
Messages: 64
Registered: May 2007
Member
Please check that autofs4 module is loaded.

I've tested 2.6.18-ovz028stab045.1kernel and autofs with nfs works fine.
Re: Does AutoFS work in OpenVZ yet? [message #22023 is a reply to message #22013] Thu, 18 October 2007 18:51 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member

When you say autofs/nfs works in a VPS, is that with a vanilla patched kernel or a Centos5 patched kernel? Again.. here on Centos5, it doesn't work.


On the base system's OS (Centos5):
------------------------------------------------------------ -
# uname -a
Linux dolly-centos5-openvz.xxx.xxx.xxx 2.6.18-8.1.14.el5.028stab045.1 #1 SMP Mon Oct 1 13:22:25 MSD 2007 i686 i686 i386 GNU/Linux


# /sbin/lsmod | grep auto
autofs4 24324 8

# tail /etc/vz/conf/101.conf
--
.
.
VE_PRIVATE="/vz/private/$VEID"
ORIGIN_SAMPLE="pvl.basic"
OSTEMPLATE="centos-5-i386-default"
NAME="dolly-centos5-A"
HOSTNAME="dolly-centos5-A"
IP_ADDRESS="10.159.4.232"
NAMESERVER="172.17.28.100 172.17.28.101"
NETDEV="eth1"
FEATURES="nfs:on"
--



In the VPS....


#cat /proc/filesystems
ext2
ext3
nodev rpc_pipefs
nodev autofs
nodev nfs
nodev proc
nodev sysfs
nodev tmpfs
nodev devpts



------

Moving forward, a manual mount works fine in the physical machine's OS as does an automount (for example, the "labtools" mount):

# mount -t nfs 10.159.4.7:/ /mnt
[works fine]

#df
.
.
phobos-cf2:/vol/lab/labtools
41943040 29057984 12885056 70% /volume/labtools
10.159.4.7:/ 948779200 103575840 797008192 12% /mnt


-------
-------

Now.. in a VPS, there are all the initial autofs errors upon initial load that are shown earlier in this thread. Manual NFS mounts DO work though their are some minor issues:

1) it throws a permission error:

mount -t nfs 10.159.4.7:/ /mnt

Can't set perms on /etc/mtab


# ls -la /etc/mtab
lrwxrwxrwx 1 root root 12 Aug 16 17:46 /etc/mtab -> /proc/mounts


2) The" mount" command shows the source of the mount as "nfs" and not the IP address (like what it does on the physical machine shown above. Seems minor but might mean something

[root@dolly-centos5-A /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
simfs 2389512 365772 2023740 16% /
nfs 948779200 103575840 797008192 12% /mnt



Still.. with all this.. running the RHEL5 kernel, the manual NFS mount is functional but "autofs" does't work when I try to login to the VPS:

#ssh dranch@10.159.4.232
dranch@10.159.4.232's password:

Last login: Thu Oct 18 11:37:52 2007 from 10.150.52.4
Could not chdir to home directory /homes/dranch: No such file or directory
-bash-3.1$

Re: Does AutoFS work in OpenVZ yet? [message #22024 is a reply to message #22023] Thu, 18 October 2007 18:58 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
From the kernel version that was given, I'm certain a stock CentOS 5 kernel is in use. He said make sure the autofs module is loaded... and all of that output you gave did not include a module listing.

I previously thought that autofs wasn't a kernel related process but if there is a module, looks like it is.

lsmod | grep auto

If you don't see the autofs4 module, load it... and bingo it might work.

I can tell you nfs doesn't work unless the nfs related modules are loaded.

I've had some problems getting depmod/modprobe figuring out the dependancies of modules and automatically loading everything as they should... so when that happened, I manually loaded all of the pieces myself with insmod. At the very least here is the module you want loaded:

/lib/modules/2.6.18-8.1.14.el5/kernel/fs/autofs4/autofs4.ko

Of course depending on the arch you have, the kernel version number directory might be a little different.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: Does AutoFS work in OpenVZ yet? [message #22028 is a reply to message #22024] Thu, 18 October 2007 22:42 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Sorry for not pasting it in but it's inferred from this thread as AutoFS works without issue from the main physical machine's OS. Regardless, to be complete, the autofs module IS loaded on the physical machine's OS:

# /sbin/lsmod | grep auto
autofs4 24324 8


The VPS doesn't have any modules according to lsmod nor does using modprobe to install autofs have any effect:

[root@dolly-centos5-A /]# /sbin/lsmod
(returns to the cmd prompt without any info)

[root@dolly-centos5-A /]# /sbin/modprobe autofs

[root@dolly-centos5-A /]# /sbin/lsmod
(returns to the cmd prompt without any info)

Re: Does AutoFS work in OpenVZ yet? [message #22031 is a reply to message #21840] Fri, 19 October 2007 01:49 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
So following efball's recommendation, I installed the patched 2.6.18 vanilla kernel and converted the VPS machines from autofs to amd. Low and behold this WORKS! Awesome but the solution is less than optimal and I really still need to get autofs working.

Why?

1) This workaround uses a plain 2.6.18 kernel and not the centos5 2.6.18 kernel. Centos and RHEL offer, in theory, a more regressed and stable kernel platform which receives timely patches via yum, etc.


2) The NIS servers I bind to offer autofs formatted maps which are incompatible with amd's format. I found the following Perl script which mostly converts the two formats but this isn't an automatic process, the script needs some minor tweaks to create 100% clean AMD maps, etc.

http://groups.google.com/group/comp.unix.bsd.freebsd.misc/br owse_thread/thread/83b4855b95148f8/d0414ce35e72e474?hl=en&am p;lnk=st&q=convert+autofs+nis+maps+to+amd#d0414ce35e72e4 74


My biggest issue with this autofs -> amd approach is that I'll need to put this Perl script into a crontab to get updates for new/deleted users, changed filers, etc. I'll also have to automate the updating of the /etc/amd.conf file whenever any automounter maps are changed (new maps, deleted, etc). All of these items are automatic with autofs and it's auto.master file.


As a test to keep things moving with getting the Autofs problem identified and hopefully fixed, I again tried to use the patched Centos5 kernel with this known working AMD setup but the VPS fails with different errors than before:

Oct 18 18:32:34 dolly-centos5-A amd[9711]: switched to logfile "syslog"
Oct 18 18:32:34 dolly-centos5-A amd[9711]: AM-UTILS VERSION INFORMATION:
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Copyright (c) 1997-2006 Erez Zadok
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Copyright (c) 1990 Jan-Simon Pendry
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Copyright (c) 1990 Imperial College of Science, Technology & Medicine
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Copyright (c) 1990 The Regents of the University of California.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: am-utils version 6.1.5 (build 1).
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Report bugs to https://bugzilla.am-utils.org/ or am-utils@am-utils.org.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Configured by mockbuild@builder6.centos.org on date Wed Mar 21 22:12:34 EDT 2007.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Built by mockbuild@builder6.centos.org on date Wed Mar 21 22:14:35 EDT 2007.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: cpu=i686 (little-endian), arch=i386, karch=i686.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: full_os=linux, os=linux, osver=2.6.9-42.0.3.ELsmp, vendor=redhat, distro=rh4.92.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: domain=spglab.juniper.net, host=dolly-centos5-A, hostd=dolly-centos5-A.dude.net.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Map support for: root, passwd, hesiod, ldap, union, nisplus, nis, ndbm,
Oct 18 18:32:34 dolly-centos5-A amd[9711]: file, exec, error.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, ufs, lofs,
Oct 18 18:32:34 dolly-centos5-A amd[9711]: cdfs, auto, direct, toplvl, error, inherit.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: FS: iso9660, lofs, nfs, nfs3, tmpfs, ext3.
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Network 1: wire="dolly-centos5-a.spglab.juniper.net" (netnumber=10.159.4.232).
Oct 18 18:32:34 dolly-centos5-A amd[9711]: Network 2: wire="1.0.0.0" (netnumber=1).
Oct 18 18:32:34 dolly-centos5-A amd[9711]: My ip addr is 127.0.0.1
Oct 18 18:32:34 dolly-centos5-A amd[9718]: released controlling tty using setsid()
Oct 18 18:32:34 dolly-centos5-A amd[9718]: file server localhost, type local, state starts up
Oct 18 18:32:34 dolly-centos5-A amd[9718]: simfs restarted fstype link on /, flags 0x89
Oct 18 18:32:34 dolly-centos5-A amd[9718]: proc restarted fstype link on /proc, flags 0x89
Oct 18 18:32:34 dolly-centos5-A amd[9718]: sysfs restarted fstype link on /sys, flags 0x89
Oct 18 18:32:34 dolly-centos5-A amd[9718]: devpts restarted fstype link on /dev/pts, flags 0x89
Oct 18 18:32:34 dolly-centos5-A amd[9718]: creating mountpoint directory '/home-adp'
Oct 18 18:32:34 dolly-centos5-A amd[9718]: creating mountpoint directory '/adpdev'
Oct 18 18:32:34 dolly-centos5-A amd[9719]: '/home-adp': mount: No such device
Oct 18 18:32:34 dolly-centos5-A amd[9720]: '/adpdev': mount: No such device
Oct 18 18:32:34 dolly-centos5-A amd[9718]: creating mountpoint directory '/local'
Oct 18 18:32:34 dolly-centos5-A amd[9721]: '/local': mount: No such device
Oct 18 18:32:34 dolly-centos5-A amd[9718]: creating mountpoint directory '/homes'
Oct 18 18:32:34 dolly-centos5-A amd[9722]: '/homes': mount: No such device
Oct 18 18:32:34 dolly-centos5-A amd[9718]: creating mountpoint directory '/vols'
Oct 18 18:32:34 dolly-centos5-A amd[9723]: '/vols': mount: No such device
Oct 18 18:32:34 dolly-centos5-A init: no more processes left in this runlevel
Oct 18 18:32:35 dolly-centos5-A amd[9719]: '/home-adp': mount: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9719]: amfs_toplvl_mount: amfs_mount failed: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9720]: '/adpdev': mount: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9720]: amfs_toplvl_mount: amfs_mount failed: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9721]: '/local': mount: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9721]: amfs_toplvl_mount: amfs_mount failed: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9722]: '/homes': mount: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9722]: amfs_toplvl_mount: amfs_mount failed: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9723]: '/vols': mount: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9723]: amfs_toplvl_mount: amfs_mount failed: No such device
Oct 18 18:32:35 dolly-centos5-A amd[9718]: /home-adp: mount (amfs_cont): No such device
Oct 18 18:32:35 dolly-centos5-A amd[9718]: /adpdev: mount (amfs_cont): No such device
Oct 18 18:32:35 dolly-centos5-A amd[9718]: /vols: mount (amfs_cont): No such device
Oct 18 18:32:35 dolly-centos5-A amd[9718]: /homes: mount (amfs_cont): No such device
Oct 18 18:32:35 dolly-centos5-A amd[9718]: /local: mount (amfs_cont): No such device


Re: Does AutoFS work in OpenVZ yet? [message #22041 is a reply to message #22023] Fri, 19 October 2007 08:34 Go to previous messageGo to next message
gblond is currently offline  gblond
Messages: 64
Registered: May 2007
Member
dranch wrote on Thu, 18 October 2007 22:51




2) The" mount" command shows the source of the mount as "nfs" and not the IP address (like what it does on the physical machine shown above. Seems minor but might mean something

[root@dolly-centos5-A /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
simfs 2389512 365772 2023740 16% /
nfs 948779200 103575840 797008192 12% /mnt




It depends on coreutils version.

I also checked 2.6.18-8.1.14.el5.028stab045.1 kernel and it works with nfs+autofs!


Please send me by e-mail detailed your system configuration and I will try to help you.
Re: Does AutoFS work in OpenVZ yet? [message #22071 is a reply to message #22028] Fri, 19 October 2007 11:33 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
Pardon me, I didn't see that you said that autofs works from the host node.

I wouldn't ask you to attempt to load modules into a VPS because is something you can't do. There's only one kernel and modules for it are managed from the host node.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: Does AutoFS work in OpenVZ yet? [message #22085 is a reply to message #22041] Fri, 19 October 2007 16:25 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
I've replied to Gblond via an email but to keep the Forum thread moving, I have:

# rpm -qa | grep core
policycoreutils-1.33.12-3.el5
coreutils-5.97-12.1.el5

--David
Re: Does AutoFS work in OpenVZ yet? [message #22091 is a reply to message #22031] Fri, 19 October 2007 20:10 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member

So I spoke too soon about AMD being a viable workaround.


Though amd does seem to work for one VE (VE#100) compared to autofs, the other two VEs either show nothing in the user's home directory or get I/O errors:


SSHing into VE100:
--
Last login: Fri Oct 19 12:39:00 2007 from 10.150.52.4

dolly-centos5-A:~$

[ Everything is ok, I can see my files and mount shows my homedir being mounted:

nfs on /.automount/uranus2/vol/homes/homes2/dranch type nfs (rw,nosuid,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp, timeo=600,retrans=3,sec=sys,addr=uranus2)

--


-------------------------------

SSHing into VE101:
--

Last login: Fri Oct 19 12:32:23 2007 from 10.150.52.4
-bash-3.1$ ls

[ Nothing. No files but also no errors. I'm supposedly in /homes/dranch but there is nothing there when I du a "ls", "du", etc. I can supposedly goto other user directories with the same behavior. Running mount does NOT show my homedir as being mounted. ]

-------------------------------

SSHing into VE102:
--
Last login: Fri Oct 19 12:41:22 2007 from 10.150.52.4
Could not chdir to home directory /homes/dranch: No such file or directory

[ This is even worse. I'm dropped to /. Mount doesn't show my homedir as being mounted. Nothing in the logs. No change if I restart amd. If I shutdown this VE, I see
--
Oct 19 12:38:57 dolly-centos5-A sshd[26588]: pam_loginuid(sshd:session): set_loginuid failed opening loginuid
--


---------------------------

Experimenting a bit, I logged out of the working VE#100 and tried to umount the /homes/dranch directory via the VZ console. This worked a few times but then later usually failed:

# umount /.automount/uranus2/vol/homes/homes2/dranch/
umount.nfs: nfs: not found / mounted or server not reachable

At this point, I would see this error upon shutdown of the VE#100:

RPC: failed to contact portmap (errno -5).



With VE#100 shutdown, I would then try to log into VE#101 to only see I/O errors and mount wouldn't show my homedir being mounted
--
Could not chdir to home directory /homes/dranch: Input/output error
-bash: /homes/dranch/.bash_profile: Input/output error
--


So I now shut down ALL VEs (100, 101, and 102). I then only restart VE#102 which was the worst off from the above examples. VE#102 now works fine.

So I start VE#101 to only get the empty directory stuff but no errors. Finally, I start VE#102 to only see the "/homes/dranch: No such file or directory" errors. It seems the behavior of the VE depends on the order it's started. Not good.

So.. there you have it. AMD does do a bit more compared to AutoFS but overall, things are still broken beyond one VE.


Other misc notes:

I've also noticed that when I shut down VEs, I always see this
in the physical machine's /var/log/messages. Maybe another hint:
--
Oct 19 12:44:12 dolly-centos5-openvz kernel: neigh_parms_release: not found
--


Re: Does AutoFS work in OpenVZ yet? [message #22092 is a reply to message #22091] Fri, 19 October 2007 20:53 Go to previous messageGo to next message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Another quick update.. all of the above thread info with AMD was where autofs running on the physical machine's OS and amd running on the VEs.

When I changed the physical machine to use amd as well, the physical machine still works but now none of the VEs can mount my homedir (which is worse than before). The VEs show the "blank" condition where none of my files are shown but there aren't any errors either.

As an experiment, I did a "modprobe autofs4" on the physical machine but that didn't do anything though the VEs would then show autofs in their /proc/filesystems

gah!

Re: Does AutoFS work in OpenVZ yet? [message #22753 is a reply to message #22092] Fri, 02 November 2007 18:29 Go to previous message
dranch is currently offline  dranch
Messages: 33
Registered: August 2007
Member
Workaround:

Woohoo! I have been working with "gblond" on this issue for some time and through the various troubleshooting, I discovered a workaround that works though we are still working on the root problem.

Specifically, with:

- the RHEL5 kernel with OpenVZ patches (2.6.18-8.1.15.el5.028stab047.1) -- no need for a vanilla kernel patched with OpenVZ

- autofs running on the HE

- amd running in the VEs (autofs doesn't work still -- bummer and thus requires cron scripts in each VE to periodically update the various maps and restart amd)


I am now able to boot the VEs and users see all their files if I do the following:


1. disable OpenVZ from automatically starting in rc3.d

2. in the rc.local file, do an "ls" of some user that is only reachable via the automounter system. This seems to kick off the NFS system in the HE properly where as it DOESN'T kick off in the VEs properly. You will see the FS caching system kick off in the logs which is critical
--
FS-Cache: Loaded
FS-Cache: netfs 'nfs' registered for caching
--

3. In the rc.local file, now wait 20 seconds

4. In the rc.local file, now start openvz


Previous Topic: Cannot access /proc/bus/pci
Next Topic: Fedora Core 2 Template?
Goto Forum:
  


Current Time: Thu Mar 28 18:03:41 GMT 2024

Total time taken to generate the page: 0.02358 seconds