AutoFS fails with Warning and will not map an NFS share on RedHat Enterpise Linux 4 U4

When I attempt to restart AutoFS I get the following error:

[root@tuw5 etc]# service autofs restart
Stopping automount:                                        [  OK  ]
Starting automount:
failed to load map: "/usr/sbin/automount --timeout=600 /home file /etc/auto.home soft,intr,rsize=8192,wsize=8192,nosuid,tcp"                                      [WARNING]
[root@tuw5 etc]#

The exact same configuration on my test systems works flawlessly.  What's causing this issue?
LVL 1
gerhardubAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wesly_chenCommented:
please post the error messages in /var/log/messages when you do "service autofs restart" as well as
grep -v ^# /etc/auto.master
grep -v ^# /etc/auto.home
grep -v ^# /etc/sysconfig/autofs
0
gerhardubAuthor Commented:
The results are:

Mar 22 20:54:36 tuw5 sshd(pam_unix)[13942]: session opened for user root by root(uid=0)
Mar 22 20:54:47 tuw5 autofs: automount shutdown succeeded
Mar 22 20:54:47 tuw5 automount[14464]: mount_autofs: already mounted
Mar 22 20:54:47 tuw5 automount[14464]: /home: mount failed!
Mar 22 20:54:47 tuw5 autofs: automount startup succeeded
Mar 22 20:55:31 tuw5 autofs: automount shutdown succeeded
Mar 22 20:55:31 tuw5 automount[14966]: mount_autofs: already mounted
Mar 22 20:55:31 tuw5 automount[14966]: /home: mount failed!
Mar 22 20:55:31 tuw5 autofs: automount startup succeeded

[root@tuw5 sysconfig]# grep -v ^# /etc/auto.master
/misc   /etc/auto.misc
/net    /etc/auto.net
/home   /etc/auto.home

[root@tuw5 sysconfig]# grep -v ^# /etc/auto.home
*       lfs1:/home/&

[root@tuw5 sysconfig]# grep -v ^# /etc/sysconfig/autofs
LOCALOPTIONS="soft,intr,rsize=8192,wsize=8192,nosuid,tcp"
DAEMONOPTIONS="--timeout=600"
LDAPAUTOMASTER=""
UNDERSCORETODOT=1
DISABLE_DIRECT=1
ONE_AUTO_MASTER=0
GHOSTDIRS=""
BASEDN=


I'm a little confused as to what is already mounted... there is a /home directory... but it's empty.
0
wesly_chenCommented:
Please also post the output of
# mount

# ls -al /home/<username>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

gerhardubAuthor Commented:
[root@tuw5 ~]# mount
/dev/md0 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/md1 on /home type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
lfs1:/home on /home type nfs (rw,addr=192.168.14.48)
automount(pid14833) on /misc type autofs (rw,fd=5,pgrp=14833,minproto=2,maxproto=4)
automount(pid14897) on /net type autofs (rw,fd=5,pgrp=14897,minproto=2,maxproto=4)

[root@tuw5 /]# ls -al /home
total 16
drwxr-xr-x   2 root root 4096 Mar 21 11:33 .
drwxr-xr-x  27 root root 4096 Mar 22 20:55 ..
[root@tuw5 /]# ls -al /home/swertheim
ls: /home/swertheim: No such file or directory
[root@tuw5 /]#

(There are no user directories locally...)

...and for giggles, I umount /home and restarted the autofs service... It gave me an error:

[root@tuw5 ~]# umount /home
[root@tuw5 ~]# ls
anaconda-ks.cfg  Desktop  install.log  install.log.syslog
[root@tuw5 ~]# service autofs start
Starting automount:
failed to load map: "/usr/sbin/automount --timeout=600 /misc file /etc/auto.misc soft,intr,rsize=8192,wsize=8192,nosuid,tcp"
failed to load map: "/usr/sbin/automount --timeout=600 /net program /etc/auto.net soft,intr,rsize=8192,wsize=8192,nosuid,tcp"
failed to load map: "/usr/sbin/automount --timeout=600 /home file /etc/auto.home soft,intr,rsize=8192,wsize=8192,nosuid,tcp"  

I wasn't getting that before... humph.
0
gerhardubAuthor Commented:
Oh, I figured out that I made a mistake with that last attempt and did not issue a:

service autofs restart, but a service autofs start... and that's why there was an error in the end of the last message.... just ignore that please.
0
gerhardubAuthor Commented:
Wesley,

I think I've figured this out, but I need a little help to ensure that I'm doing things right and proper:

I'm using software mirroring (RAID 1) in Linux.

What I've been able to determine is that if I issue the command:

umount -l /home

/home mount is forced to dismount...

If I then run: service autofs restart, everything works fine.

The RAID 1 is the only thing that is different between the systems!

So I edited the /etc/fstab file and put a # in front of the /home line so that /home would not mount on start up.

Is this the best way to handle the issue?  ...or should I be doing something different??

Thanks,

Gerhard
0
infleadorixCommented:
Is /home a separate filesystem on another box, or is it as part of the / filesystem?
0
gerhardubAuthor Commented:
Ok,

The way I set up the boxes are:

A file server with a /home partition called lfs1

A group of RedHat systems with individual partitions for everything.

/, /home, swap, etc... all paritioned out manually.

However, I RAID 1ed everything except the /boot parition on the RedHat workstations.

When you look into FSTAB on the RedHat Workstations, you see a /home mount that is like MD1 with ext3 1 2 or something.

What appears to work is that if I put a # in front of the /home mount on the workstations, then /home never mounts to the local local file system... and everything appears to work fine.

Is this a good idea?  Is it going to cause me issue with the NFS export from the file server of /home?  (I'm auto mounting the /home on the NFS server to the local /home for the user's home directories...)

Gerhard
0
infleadorixCommented:
I think I might miss something here because the problem seems a bit too obvious to me: you cannot automount /home because it is already mounted locally via /etc/fstab at boot time. It works when you comment out the entry in /etc/fstab because the filesystem is no longer mounted on the /home mountpoint at boot; therefore, an NFS share can be mounted there.

You should partition the workstations so that the /home directory is not a separate filesystem. Instead, make it part of the root (/) filesystem. But if you cannot easily reinstall the workstations, I guess commenting out (with #)  the entry in /etc/fstab would do it.
0
gerhardubAuthor Commented:
Are there any downsides to commenting out the /home mount?

...and no, reinstalling the workstations is not entirely possible.
0
infleadorixCommented:
I don't mean to take over wesley_chen prior work. The questions he has asked you are helpful in figuring out what might be the issue.

There is no downside to commenting out the /home mount entry from /etc/fstab besides the fact that whatever is stored locally (on the local /home filesystem) will not be accessible while the filesystem is unmounted. In other words, you have to unmount the local filesystem in order to mount the NFS share; that makes the content of your local filesystem inaccessible until it is later mounted. Thus, you can create another directory such as /home_loc and mount the local /home filesystem there. This way you have access to both the NFS-shared /home as well as local /home. Another downside is that you lose the disk space allocated to the local /home directory, which could have been allocated to other filesystems.

I assume you mount /home via NFS in conjunction with using some sort of centralized authentication (e.g. NIS, LDAP) to authenticate the users site-wide? In that case, I don't think you have anything stored in the local /home directory on each workstation. Thus, just commenting it out should not cause any problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.