Skip to contentSkip to conversation

autofs-4.1.3 not working properly

DISCUSSION Prakash Velayutham 2 participants 2 messages Nov 30, 2005 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Neither is the case. I initialized manually umounted the user before moving his home directory and even restarted autofs. But it still kept looking at the previous entry for some strange reason. I did not do the nscd portion though and probably that is the issue. But finger <username> properly showed the home directory as the new one??? Also I do not have a LDAP master/slave setup yet? It is just master every client talks to.

Thanks,
Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Chris Croswhite <[email protected]> 11/29/05 7:22 PM >>>

hmm, the delay would probably be associated with either:
A: time out for the active mount point (see /etc/init.d/autofs, daemon options which defaults to 300 seconds)
B: latency with replication between ldap consumers and masters/hubs (i.e. replication latency between master ldap and slave servers (nis parlance)?

Quoted 7 lines · Prakash Velayutham

Thanks Chris,

Of course, I did all that before sending the previous email and still the client kept looking at the old mount entry. But about 5 minutes after I sent the email it started looking at the new entry. Just some delay in the change propagating I guess. Thanks again.

Quoted 5 lines

Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Chris Croswhite <[email protected]> 11/29/05 6:44 PM >>>

uhh, you mean you migrated it to a different server? Now you need to update the ldap maps, and force autofs to rehash all the maps (though

it

Quoted 9 lines

really does not do a rehash) on the client (autofs reload). You might want to first force umount of the changed dir or the old mount will stay. Also, you should hup nscd so that the entry is not cached.

Quoted 3 lines · Prakash Velayutham

Hi,

What is the best practice when you want to move a user's home dir

from

Quoted 5 lines
Quoted 2 lines

one server to another in an LDAP setting. Server1's /home/<user> is mounted via NFS on the client's /server1/users mount point and

server2's

Quoted 2 lines

/home/<user> is mounted via NFS on the client's /server2/users mountpoint. The 2 are defined as separate map entries in the LDAP.

How

Quoted 9 lines
Quoted 9 lines

do I go about migrating a user's home dir from server1 to server2 or vice versa.

Thanks for the help,
Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Ian Kent <[email protected]> 11/27/05 4:49 AM >>>

On Sat, 26 Nov 2005, Prakash Velayutham wrote:

Quoted 12 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Ian Kent <[email protected]> 11/25/05 1:47 PM >>>

Quoted 4 lines · Prakash Velayutham

Hi,

I am new to this list, so please forgive my ignorances. I had a SuSE Pro 9.0 system running autofs (v3) running earlier.

The

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

autofs itself did not have any issues at all until I decided to

upgrade

Quoted 1 line

the system to SuSE 9.3. It was a clean install, and

autofs4-4.1.3

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

became

Quoted 1 line

the default kernel autofs module. My autofs master map comes

from

Quoted 12 lines

a

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines

OpenLDAP server and it contains 3 different mount maps. /users (LDAP map)
/protein/users (LDAP map)
/import/users (LDAP map)
I also have a file-based map in this server (/export/users).

Recently I was trying to move a user's home dir from server1 to

server2.

Quoted 1 line

After moving his home dir and making the relevant changes to his

LDAP

Quoted 1 line
Quoted 1 line

entry (homeDirectory attribute), I tried to restart autofs in

the

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

above-mentioned server. The server already had several users

logged

Quoted 3 lines

in

Quoted 2 lines
Quoted 2 lines

under /protein/users. Though the restart did not complain, I

noticed

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

that autofs status showed "Configured mount points" correctly

and

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line

removed the currently mounted mount points from "Active mount

points".

Quoted 2 lines
Quoted 2 lines

Is there a reason why? Also strangely the ownerships of the

previously

Quoted 3 lines
Quoted 2 lines

mounted dirs had been changed to root:root.

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

I'm not sure what is not working or what has been broken. What is the actual problem and symptom?

Ian

Thanks Ian for a reply. What if I restart autofs when a user whose

home

Quoted 1 line

dir is mounted through autofs is already logged into the system

(and

Quoted 8 lines
Quoted 1 line
Quoted 1 line

hence at least one of the automount entries is being used)? What

will

Quoted 6 lines
Quoted 1 line

the system do in that case?

On runing "reload" it should, depending on version and patch levels re-read and update the map, leave the mounted directory mounted and leave
the stale map entry for cleanup next time the map is reloaded and

the

Quoted 3 lines
Quoted 3 lines

entry isn't mounted.

"Restart"ing is much more agressive and I wouldn't recommend it if

you

Quoted 2 lines
Quoted 2 lines

have mount that are in use. To restart you really need to have

nothing

Quoted 5 lines
Quoted 5 lines

actually in use.

Quoted 2 lines

And also if I change the ldap attribute "homeDirectory" for a

user,

Quoted 6 lines

do

Quoted 2 lines

I

Quoted 1 line

have to restart autofs in a system for that change to be seen.

Because

Quoted 2 lines

I

Quoted 1 line

sometimes see that the system has cached the user's attributes

from

Quoted 7 lines
Quoted 4 lines

LDAP

Quoted 1 line

and tries to use that and fails.

autofs doesn't use that attribute so no, but you'll need to be sure

that

Quoted 2 lines

the automount map entry that is used to access that directory is

still

Quoted 10 lines
Quoted 10 lines

valid following the change and if it also had to be changed then you might
need to "reload" autofs. It's worth pointing out that later versions (most
RedHat versions and 4.1.4 I think) of autofs should recognise this change
on access without needing to re-load the map.

The other thing I noticed about your query was the question about

the

Quoted 4 lines
Quoted 4 lines

root
owned directory. At variuos times in the past development autofs has been
(mostly intentionally) lazy about cleaning up mount point

directories.

Quoted 18 lines
Quoted 16 lines

When autofs directories don't have a filesystem mounted on them they will
appear root owned. It shouldn't make a difference to operation.

Ian

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

maintainer
#1 lore raw
Quoted 7 lines · Prakash Velayutham

Neither is the case. I initialized manually umounted the user before moving his home directory and even restarted autofs. But it still kept looking at the previous entry for some strange reason. I did not do the nscd portion though and probably that is the issue. But finger <username> properly showed the home directory as the new one??? Also I do not have a LDAP master/slave setup yet? It is just master every client talks to.

nscd .... mmmm.

"/etc/init.d/nscd stop" (wry smile) works well for this on Solaris. I'm guessing it will do same on Linux.

If the user info is not seen correctly you are stuck.

Quoted 185 lines

Thanks,
Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Chris Croswhite <[email protected]> 11/29/05 7:22 PM >>>

hmm, the delay would probably be associated with either:
A: time out for the active mount point (see /etc/init.d/autofs, daemon options which defaults to 300 seconds)
B: latency with replication between ldap consumers and masters/hubs (i.e. replication latency between master ldap and slave servers (nis parlance)?

Quoted 7 lines · Prakash Velayutham

Thanks Chris,

Of course, I did all that before sending the previous email and still the client kept looking at the old mount entry. But about 5 minutes after I sent the email it started looking at the new entry. Just some delay in the change propagating I guess. Thanks again.

Quoted 5 lines

Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Chris Croswhite <[email protected]> 11/29/05 6:44 PM >>>

uhh, you mean you migrated it to a different server? Now you need to update the ldap maps, and force autofs to rehash all the maps (though

it

Quoted 9 lines

really does not do a rehash) on the client (autofs reload). You might want to first force umount of the changed dir or the old mount will stay. Also, you should hup nscd so that the entry is not cached.

Quoted 3 lines · Prakash Velayutham

Hi,

What is the best practice when you want to move a user's home dir

from

Quoted 5 lines
Quoted 2 lines

one server to another in an LDAP setting. Server1's /home/<user> is mounted via NFS on the client's /server1/users mount point and

server2's

Quoted 2 lines

/home/<user> is mounted via NFS on the client's /server2/users mountpoint. The 2 are defined as separate map entries in the LDAP.

How

Quoted 9 lines
Quoted 9 lines

do I go about migrating a user's home dir from server1 to server2 or vice versa.

Thanks for the help,
Prakash

Quoted 1 line
Quoted 1 line
Quoted 1 line

Ian Kent <[email protected]> 11/27/05 4:49 AM >>>

On Sat, 26 Nov 2005, Prakash Velayutham wrote:

Quoted 12 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Ian Kent <[email protected]> 11/25/05 1:47 PM >>>

Quoted 4 lines · Prakash Velayutham

Hi,

I am new to this list, so please forgive my ignorances. I had a SuSE Pro 9.0 system running autofs (v3) running earlier.

The

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

autofs itself did not have any issues at all until I decided to

upgrade

Quoted 1 line

the system to SuSE 9.3. It was a clean install, and

autofs4-4.1.3

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

became

Quoted 1 line

the default kernel autofs module. My autofs master map comes

from

Quoted 12 lines

a

Quoted 11 lines
Quoted 9 lines
Quoted 7 lines

OpenLDAP server and it contains 3 different mount maps. /users (LDAP map)
/protein/users (LDAP map)
/import/users (LDAP map)
I also have a file-based map in this server (/export/users).

Recently I was trying to move a user's home dir from server1 to

server2.

Quoted 1 line

After moving his home dir and making the relevant changes to his

LDAP

Quoted 1 line
Quoted 1 line

entry (homeDirectory attribute), I tried to restart autofs in

the

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

above-mentioned server. The server already had several users

logged

Quoted 3 lines

in

Quoted 2 lines
Quoted 2 lines

under /protein/users. Though the restart did not complain, I

noticed

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

that autofs status showed "Configured mount points" correctly

and

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line

removed the currently mounted mount points from "Active mount

points".

Quoted 2 lines
Quoted 2 lines

Is there a reason why? Also strangely the ownerships of the

previously

Quoted 3 lines
Quoted 2 lines

mounted dirs had been changed to root:root.

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

I'm not sure what is not working or what has been broken. What is the actual problem and symptom?

Ian

Thanks Ian for a reply. What if I restart autofs when a user whose

home

Quoted 1 line

dir is mounted through autofs is already logged into the system

(and

Quoted 8 lines
Quoted 1 line
Quoted 1 line

hence at least one of the automount entries is being used)? What

will

Quoted 6 lines
Quoted 1 line

the system do in that case?

On runing "reload" it should, depending on version and patch levels re-read and update the map, leave the mounted directory mounted and leave
the stale map entry for cleanup next time the map is reloaded and

the

Quoted 3 lines
Quoted 3 lines

entry isn't mounted.

"Restart"ing is much more agressive and I wouldn't recommend it if

you

Quoted 2 lines
Quoted 2 lines

have mount that are in use. To restart you really need to have

nothing

Quoted 5 lines
Quoted 5 lines

actually in use.

Quoted 2 lines

And also if I change the ldap attribute "homeDirectory" for a

user,

Quoted 6 lines

do

Quoted 2 lines

I

Quoted 1 line

have to restart autofs in a system for that change to be seen.

Because

Quoted 2 lines

I

Quoted 1 line

sometimes see that the system has cached the user's attributes

from

Quoted 7 lines
Quoted 4 lines

LDAP

Quoted 1 line

and tries to use that and fails.

autofs doesn't use that attribute so no, but you'll need to be sure

that

Quoted 2 lines

the automount map entry that is used to access that directory is

still

Quoted 10 lines
Quoted 10 lines

valid following the change and if it also had to be changed then you might
need to "reload" autofs. It's worth pointing out that later versions (most
RedHat versions and 4.1.4 I think) of autofs should recognise this change
on access without needing to re-load the map.

The other thing I noticed about your query was the question about

the

Quoted 4 lines
Quoted 4 lines

root
owned directory. At variuos times in the past development autofs has been
(mostly intentionally) lazy about cleaning up mount point

directories.

Quoted 12 lines
Quoted 12 lines

When autofs directories don't have a filesystem mounted on them they will
appear root owned. It shouldn't make a difference to operation.

Ian

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Quoted 6 lines
Quoted 4 lines

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs