RHEL autofs/automount issue
Posted: Mon Jun 09, 2014 7:57 pm
I was working on a RHEL 6.4 server (laxm1281) and trying to register it with RHN Satellite server.
When I tried to create a directory, I got the following error message:
I searched online and found some clues.
First, I can use 'fuser' command to check on the directory.
Then, I can kill or stop this process and the directory will become writable.
Automount reads from /etc/auto.master file for the list of automounted file systems/directories.
After checking the file, I didn't see anything in it. Then, I checked /etc/nsswitch.conf file. It has the folloiwng setting for automount:
This means automount will read an auto.master file from NIS that I have no access. I believe /apps.mdt and others reside in NIS auto.master file.
Once I remove "nis" from automount line in /etc/nsswitch.conf, /apps.mdt is no longer automounted after restarting autofs/automount.
When I tried to create a directory, I got the following error message:
Code: Select all
# laxm1281:/apps.mdt%mkdir ks
mkdir: cannot create directory `ks': Permission denied
First, I can use 'fuser' command to check on the directory.
Code: Select all
# laxm1281:/root%fuser -mv /apps.mdt
USER PID ACCESS COMMAND
/apps.mdt: root 2995 f.... automount
Code: Select all
# service autofs stop
After checking the file, I didn't see anything in it. Then, I checked /etc/nsswitch.conf file. It has the folloiwng setting for automount:
Code: Select all
automount: files nis
Once I remove "nis" from automount line in /etc/nsswitch.conf, /apps.mdt is no longer automounted after restarting autofs/automount.
Code: Select all
laxm1281:/etc%service autofs restart
Stopping automount: [ OK ]
Starting automount: [ OK ]