[autofs] autofs hangs

2011-03-12 Thread Jaskaran Singh
I am running into an issue here, I using autofs with ldap to mount /home 
directories. This is my os version Description: Ubuntu 10.10 Release: 10.10

my /etc/auto.master is commented out.
in /etc/nsswitch.conf last line is
automount: ldap
I can automount my home directory from the NFS server using LDAP with 
out an issue. But after a few minutes of inactivity, when i  try to 
login to the machine and run my application it hangs. My application 
tries to read /etc/config.txt but rather than reading /etc/config.txt it 
tries to mount /home/etc/config.txt , i can see that in the syslog which 
is attached below.
If i were to login and move to another location besides /home/*, the 
command will run fine for example if I cd from/home to any other part of 
the file system like /tmp or /var/log.


Mar  9 14:02:02 console automount[23227]: do_bind: lookup(ldap): ldap 
simple bind returned 0
Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap): 
searching for 
((objectclass=automount)(|(cn=repository)(cn=/)(cn=\2A))) under 
ou=auto.home,dc=domain,dc=org
Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap): 
getting first entry for cn=repository
Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap): got 
answer, but no entry for 
((objectclass=automount)(|(cn=repository)(cn=/)(cn=\2A)))
Mar  9 14:02:02 console automount[23227]: key repository not found in 
map source(s).

Mar  9 14:02:02 console automount[23227]: ioctl_send_fail: token = 548
Mar  9 14:02:02 console automount[23227]: failed to mount /home/repository
Mar  9 14:02:02 console automount[23227]: handle_packet: type = 3
Mar  9 14:02:02 console automount[23227]: 
handle_packet_missing_indirect: token 549, name repository, request pid 
23381
Mar  9 14:02:02 console automount[23227]: attempting to mount entry 
/home/repository
Mar  9 14:02:02 console automount[23227]: lookup_mount: lookup(ldap): 
looking up repository

Mar  9 14:02:02 console automount[23227]: ioctl_send_fail: token = 549
Mar  9 14:02:02 console automount[23227]: failed to mount /home/repository
Mar  9 14:02:19 console automount[23227]: st_expire: state 1 path /home
Mar  9 14:02:19 console automount[23227]: expire_proc: exp_proc = 
3057638256 path /home
Mar  9 14:02:19 console automount[23227]: expire_proc_indirect: expire 
/home/jsingh

Mar  9 14:02:19 console automount[23227]: 1 remaining in /home
Mar  9 14:02:19 console automount[23227]: expire_cleanup: got thid 
3057638256 path /home stat 3
Mar  9 14:02:19 console automount[23227]: expire_cleanup: sigchld: exp 
3057638256 finished, switching from 2 to 1
Mar  9 14:02:19 console automount[23227]: st_ready: st_ready(): state = 
2 path /home

Mar  9 14:03:34 console automount[23227]: st_expire: state 1 path /home
Mar  9 14:03:34 console automount[23227]: expire_proc: exp_proc = 
3057638256 path /home
Mar  9 14:03:34 console automount[23227]: expire_proc_indirect: expire 
/home/jsingh

Mar  9 14:03:34 console automount[23227]: 1 remaining in /home

Mar 7 17:04:39 console automount[1105]: lookup_one: lookup(ldap): got 
answer, but no entry for ((objectclass=automount)(|(cn=etc)(cn=/)(cn=\2A)))
Mar 7 17:04:39 console automount[1105]: key etc not found in map 
source(s).

Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 2
Mar 7 17:04:39 console automount[1105]: failed to mount /home/etc
Mar 7 17:04:39 console automount[1105]: handle_packet: type = 3
Mar 7 17:04:39 console automount[1105]: handle_packet_missing_indirect: 
token 3, name repository, request pid 2011


Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 3
Mar 7 17:04:39 console automount[1105]: failed to mount /home/repository
Mar 7 17:04:39 console automount[1105]: handle_packet: type = 3
Mar 7 17:04:39 console automount[1105]: handle_packet_missing_indirect: 
token 4, name repository, request pid 2011
Mar 7 17:04:39 console automount[1105]: attempting to mount entry 
/home/repository
Mar 7 17:04:39 console automount[1105]: lookup_mount: lookup(ldap): 
looking up repository

Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 4
Mar 7 17:04:39 console automount[1105]: failed to mount /home/repository

Mar 7 17:05:34 console automount[1105]: handle_packet: type = 3
Mar 7 17:05:34 console automount[1105]: handle_packet_missing_indirect: 
token 5, name etc, request pid 2126

Mar 7 17:05:34 console automount[1105]: attempting to mount entry /home/etc
Mar 7 17:05:34 console automount[1105]: lookup_mount: lookup(ldap): 
looking up etc

Mar 7 17:05:34 console automount[1105]: ioctl_send_fail: token = 5
Mar 7 17:05:34 console automount[1105]: failed to mount /home/etc

autofs:
  Installed: 5.0.5-0ubuntu2
  Candidate: 5.0.5-0ubuntu2
  Version table:
 *** 5.0.5-0ubuntu2 0
500 http://us.archive.ubuntu.com/ubuntu/ 
http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages

100 /var/lib/dpkg/status

The defaut autofs contains the
TIMEOUT=3000
LOGGING=debug
MOUNT_NFS_DEFAULT_PROTOCOL=4

[autofs] Use bind instead of nfs if host is localhost feature is broken? removed?

2011-03-12 Thread Nye Liu
I have been relying on the behavior that

foo host:/export/foo

uses 'bind' if host is localhost, and 'nfs' otherwise...

i.e. if i am on the machine host, /export/foo is mounted on /mnt/foo using
bind, but if i am not on host, host:/export/foo is mounted on /mnt/foo
using nfs.

But the latest version of autofs no longer does that.

Do i have to use this everywhere now?

foo (1),host(2):/export/foo

The behavior is more like what I expect, but it seems wasteful.

-- 
Nye Liu
n...@mrv.com
(818) 772-6235x248
(818) 772-0576 fax

Who would be stupid enough to quote a fictitious character?
-- Don Quixote

___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] autofs problem

2011-03-12 Thread Ian Kent
On Tue, 2011-03-08 at 11:24 +, hpc.ad...@uea.ac.uk wrote:
 Hello,
 
 I am experiencing autofs problems with my Centos 5.5 system. Upon boot, the
 mount fails with the following error messages (created by passing the -d
 option in the automount):
 
 Mar  8 10:38:19 cn024 automount[6395]: do_notify_state: signal 15
 Mar  8 10:38:19 cn024 automount[6395]: master_notify_state_change: sig 15
 switching /home from 1 to 5
 Mar  8 10:38:19 cn024 automount[6395]: st_prepare_shutdown: state 1 path
 /home
 Mar  8 10:38:19 cn024 automount[6395]: expire_proc: exp_proc = 1090562368
 path /home
 Mar  8 10:38:19 cn024 automount[6395]: expire_cleanup: got thid 1090562368
 path /home stat 0
 Mar  8 10:38:19 cn024 automount[6395]: expire_cleanup: sigchld: exp
 1090562368 finished, switching from 5 to 7
 Mar  8 10:38:19 cn024 automount[6395]: st_shutdown: state 5 path /home
 Mar  8 10:38:19 cn024 smartd[7258]: smartd has fork()ed into background
 mode. New PID=7258.
 Mar  8 10:38:19 cn024 automount[6395]: umount_multi: path /home incl 0
 Mar  8 10:38:19 cn024 automount[6395]: umounted indirect mount /home
 Mar  8 10:38:19 cn024 automount[6395]: automount_path_to_fifo: fifo name
 /var/run/autofs.fifo-home
 Mar  8 10:38:19 cn024 automount[6395]: shut down path /home
 Mar  8 10:38:19 cn024 automount[6395]: autofs stopped
 Mar  8 10:38:28 cn024 automount[7334]: Starting automounter version
 5.0.1-0.rc2.143.el5, master map auto.master
 Mar  8 10:38:28 cn024 automount[7334]: using kernel protocol version 5.01
 Mar  8 10:38:28 cn024 automount[7334]: lookup_nss_read_master: reading
 master files auto.master
 Mar  8 10:38:28 cn024 automount[7334]: parse_init: parse(sun): init gathered
 global options: (null)
 Mar  8 10:38:28 cn024 automount[7334]: lookup_read_master: lookup(file):
 read entry /home
 Mar  8 10:38:28 cn024 automount[7334]: master_do_mount: mounting /home
 Mar  8 10:38:28 cn024 automount[7334]: automount_path_to_fifo: fifo name
 /var/run/autofs.fifo-home
 Mar  8 10:38:28 cn024 automount[7334]: lookup_nss_read_map: reading map file
 /etc/auto.home
 Mar  8 10:38:28 cn024 automount[7334]: parse_init: parse(sun): init gathered
 global options: rw,intr
 Mar  8 10:38:28 cn024 automount[7334]: do_mount_autofs_indirect: failed to
 create ioctl fd for autofs path /home
 Mar  8 10:38:28 cn024 automount[7334]: handle_mounts: mount of /home failed!
 Mar  8 10:38:28 cn024 automount[7334]: master_do_mount: failed to startup
 mount
 Mar  8 10:38:28 cn024 automount[7334]: no mounts in table
 
 The error messages to note are the last four lines. When I restart the
 daemon, the automount works, but fails after a day or two. The version of
 autofs I am using is:

What makes you think these are the same problem?
Did you check to see if /home was already mounted when it failed?
What is in your /etc/sysconfig/autofs?

 
 Name: autofs   Relocations: (not relocatable)
 Version : 5.0.1Vendor: CentOS
 Release : 0.rc2.143.el5_5.6 
 
 Any help will be greatly appreciated. Thanks in advance.
 
 --
 Wadud Miah
 High Performance Computing Systems Developer
 Research Computing Services, University of East Anglia
 Telephone: 01603 593856
 
 Information Services
 --
 
 
 
 ___
 autofs mailing list
 autofs@linux.kernel.org
 http://linux.kernel.org/mailman/listinfo/autofs


___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


Re: [autofs] autofs hangs

2011-03-12 Thread Ian Kent
On Wed, 2011-03-09 at 14:11 -0500, Jaskaran Singh wrote:
 I am running into an issue here, I using autofs with ldap to
 mount /home directories. This is my os version Description: Ubuntu
 10.10 Release: 10.10
 my /etc/auto.master is commented out.
 in /etc/nsswitch.conf last line is 
 automount: ldap
 I can automount my home directory from the NFS server using LDAP with
 out an issue. But after a few minutes of inactivity, when i  try to
 login to the machine and run my application it hangs. My application
 tries to read /etc/config.txt but rather than reading /etc/config.txt
 it tries to mount /home/etc/config.txt , i can see that in the syslog
 which is attached below.
 If i were to login and move to another location besides /home/*, the
 command will run fine for example if I cd from/home to any other part
 of the file system like /tmp or /var/log.

Somehow you need to get an strace when the access to /etc/config.txt is
happening, that might help.

 
 Mar  9 14:02:02 console automount[23227]: do_bind: lookup(ldap): ldap
 simple bind returned 0
 Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap):
 searching for ((objectclass=automount)(|(cn=repository)(cn=/)(cn=
 \2A))) under ou=auto.home,dc=domain,dc=org
 Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap):
 getting first entry for cn=repository
 Mar  9 14:02:02 console automount[23227]: lookup_one: lookup(ldap):
 got answer, but no entry for
 ((objectclass=automount)(|(cn=repository)(cn=/)(cn=\2A)))
 Mar  9 14:02:02 console automount[23227]: key repository not found
 in map source(s).
 Mar  9 14:02:02 console automount[23227]: ioctl_send_fail: token = 548
 Mar  9 14:02:02 console automount[23227]: failed to
 mount /home/repository
 Mar  9 14:02:02 console automount[23227]: handle_packet: type = 3
 Mar  9 14:02:02 console automount[23227]:
 handle_packet_missing_indirect: token 549, name repository, request
 pid 23381
 Mar  9 14:02:02 console automount[23227]: attempting to mount
 entry /home/repository
 Mar  9 14:02:02 console automount[23227]: lookup_mount: lookup(ldap):
 looking up repository
 Mar  9 14:02:02 console automount[23227]: ioctl_send_fail: token = 549
 Mar  9 14:02:02 console automount[23227]: failed to
 mount /home/repository
 Mar  9 14:02:19 console automount[23227]: st_expire: state 1
 path /home
 Mar  9 14:02:19 console automount[23227]: expire_proc: exp_proc =
 3057638256 path /home
 Mar  9 14:02:19 console automount[23227]: expire_proc_indirect:
 expire /home/jsingh
 Mar  9 14:02:19 console automount[23227]: 1 remaining in /home
 Mar  9 14:02:19 console automount[23227]: expire_cleanup: got thid
 3057638256 path /home stat 3
 Mar  9 14:02:19 console automount[23227]: expire_cleanup: sigchld: exp
 3057638256 finished, switching from 2 to 1
 Mar  9 14:02:19 console automount[23227]: st_ready: st_ready(): state
 = 2 path /home
 Mar  9 14:03:34 console automount[23227]: st_expire: state 1
 path /home
 Mar  9 14:03:34 console automount[23227]: expire_proc: exp_proc =
 3057638256 path /home
 Mar  9 14:03:34 console automount[23227]: expire_proc_indirect:
 expire /home/jsingh
 Mar  9 14:03:34 console automount[23227]: 1 remaining in /home
 
 
 
 Mar 7 17:04:39 console automount[1105]: lookup_one: lookup(ldap): got
 answer, but no entry for ((objectclass=automount)(|(cn=etc)(cn=/)(cn=
 \2A)))
 Mar 7 17:04:39 console automount[1105]: key etc not found in map
 source(s).
 Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 2
 Mar 7 17:04:39 console automount[1105]: failed to mount /home/etc
 Mar 7 17:04:39 console automount[1105]: handle_packet: type = 3
 Mar 7 17:04:39 console automount[1105]:
 handle_packet_missing_indirect: token 3, name repository, request pid
 2011
 
 Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 3
 Mar 7 17:04:39 console automount[1105]: failed to
 mount /home/repository
 Mar 7 17:04:39 console automount[1105]: handle_packet: type = 3
 Mar 7 17:04:39 console automount[1105]:
 handle_packet_missing_indirect: token 4, name repository, request pid
 2011
 Mar 7 17:04:39 console automount[1105]: attempting to mount
 entry /home/repository
 Mar 7 17:04:39 console automount[1105]: lookup_mount: lookup(ldap):
 looking up repository
 Mar 7 17:04:39 console automount[1105]: ioctl_send_fail: token = 4
 Mar 7 17:04:39 console automount[1105]: failed to
 mount /home/repository
 
 Mar 7 17:05:34 console automount[1105]: handle_packet: type = 3
 Mar 7 17:05:34 console automount[1105]:
 handle_packet_missing_indirect: token 5, name etc, request pid 2126
 Mar 7 17:05:34 console automount[1105]: attempting to mount
 entry /home/etc
 Mar 7 17:05:34 console automount[1105]: lookup_mount: lookup(ldap):
 looking up etc
 Mar 7 17:05:34 console automount[1105]: ioctl_send_fail: token = 5
 Mar 7 17:05:34 console automount[1105]: failed to mount /home/etc
 
 autofs:
   Installed: 5.0.5-0ubuntu2
   Candidate: 5.0.5-0ubuntu2
   Version table:
  *** 5.0.5-0ubuntu2 0
 500 

Re: [autofs] Use bind instead of nfs if host is localhost feature is broken? removed?

2011-03-12 Thread Ian Kent
On Thu, 2011-03-10 at 15:59 -0800, Nye Liu wrote:
 I have been relying on the behavior that
 
 foo   host:/export/foo
 
 uses 'bind' if host is localhost, and 'nfs' otherwise...
 
 i.e. if i am on the machine host, /export/foo is mounted on /mnt/foo using
 bind, but if i am not on host, host:/export/foo is mounted on /mnt/foo
 using nfs.
 
 But the latest version of autofs no longer does that.

What latest version?

 
 Do i have to use this everywhere now?
 
 foo   (1),host(2):/export/foo
 
 The behavior is more like what I expect, but it seems wasteful.
 


___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs


[autofs] Recovering from the loss of a NFS Server

2011-03-12 Thread Breitman, Jason
OS
Linux hostname 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 
x86_64 x86_64 x86_64 GNU/Linux

autofs package
autofs-5.0.1-0.rc2.148.bz579312.1.el5

Mount options
$ cat /etc/auto.master
# Master map for automounter
#
/home auto_home   -hard,intr,retry=10

$ cat /etc/sysconfig/autofs
TIMEOUT=86400 - we have a long TIMEOUT to avoid mount storms.

What am I trying to do?
Prior to a disaster recovery test, my home directory will be mounted 
from my-nfs-server.domainname:/home/jbreitma.
At this point my-nfs-server.domainname points to 1.1.1.1.
There are active reads and writes to my home directory.
Lets say I have a subdirectory called htdocs and am running apache.

Now we are cutoff from 1.1.1.1 because the Data Center where 1.1.1.1 
lives is no longer accessible.
We simulate this with an ACL.
We now repoint my-nfs-server.domainname to 2.2.2.2.

The NFS Clients where /home/jbreitma is mounted are now confused.

What is my best coarse of action?
umount -l /home/jbreitma
/etc/init.d/autofs restart
fuser -k /home/jbreitma
kill -USR1 `pgrep automount`
etc ...

How do I recover from this situation?   
I am open to a new approach if that is required.


I have had some success with umount -l /home/jbreitma followed by a 
/etc/init.d/autofs restart, but this does not always work.
I specifically fail when active writes and or reads are occurring to 
/home/jbreitma.


Jason Breitman
AT-Tech-GTI
jason.breit...@blackrock.com
BlackRock

THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE 
PRIVILEGED.  If this message was misdirected, BlackRock, Inc. and its 
subsidiaries, (BlackRock) does not waive any confidentiality or privilege.  
If you are not the intended recipient, please notify us immediately and destroy 
the message without disclosing its contents to anyone.  Any distribution, use 
or copying of this e-mail or the information it contains by other than an 
intended recipient is unauthorized.  The views and opinions expressed in this 
e-mail message are the author's own and may not reflect the views and opinions 
of BlackRock, unless the author is authorized by BlackRock to express such 
views or opinions on its behalf.  All email sent to or from this address is 
subject to electronic storage and review by BlackRock.  Although BlackRock 
operates anti-virus programs, it does not accept responsibility for any damage 
whatsoever caused by viruses being passed.


___
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs