Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-03-22
11
Medium Priority
?
3,421 Views
Last Modified: 2013-12-16
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?
0
Comment
Question by:gerhardub
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
11 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 18775987
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
 
LVL 1

Author Comment

by:gerhardub
ID: 18776613
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
 
LVL 38

Accepted Solution

by:
wesly_chen earned 1000 total points
ID: 18776748
Please also post the output of
# mount

# ls -al /home/<username>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:gerhardub
ID: 18778407
[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
 
LVL 1

Author Comment

by:gerhardub
ID: 18781539
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
 
LVL 1

Author Comment

by:gerhardub
ID: 18789937
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
 
LVL 4

Expert Comment

by:infleadorix
ID: 18790171
Is /home a separate filesystem on another box, or is it as part of the / filesystem?
0
 
LVL 1

Author Comment

by:gerhardub
ID: 18790580
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
 
LVL 4

Expert Comment

by:infleadorix
ID: 18790729
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
 
LVL 1

Author Comment

by:gerhardub
ID: 18791643
Are there any downsides to commenting out the /home mount?

...and no, reinstalling the workstations is not entirely possible.
0
 
LVL 4

Assisted Solution

by:infleadorix
infleadorix earned 1000 total points
ID: 18792363
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question