Linux Autofs Mount Problem Cannot Lock Mtab

While I am trying to go to the autofs file system it is unable to mount automatically, while checking the autofs status, I got the following status.
   CGroup: /system.slice/autofs.service
           └─8501 /usr/sbin/automount --pid-file /run/autofs.pid

Nov 28 18:20:55 hn2017 automount[8501]: key "libc.so.6" not found in map source(s).
Nov 28 18:20:55 hn2017 automount[8501]: key "libpcre.so.1" not found in map source(s).
Nov 28 18:20:55 hn2017 automount[8501]: key "libdl.so.2" not found in map source(s).
Nov 28 18:20:55 hn2017 automount[8501]: key "libattr.so.1" not found in map source(s).
Nov 28 18:20:55 hn2017 automount[8501]: key "libpthread.so.0" not found in map source(s).
Nov 28 18:21:32 hn2017 automount[8501]: key "librt.so.1" not found in map source(s).

Nov 28 18:21:32 hn2017 automount[8501]: key "liblzma.so.5" not found in map source(s).
Nov 28 18:21:32 hn2017 automount[8501]: key "libgcrypt.so.11" not found in map source(s).
Nov 28 18:21:32 hn2017 automount[8501]: key "libgcc_s.so.1" not found in map source(s).
Nov 28 18:21:32 hn2017 automount[8501]: key "libgpg-error.so.0" not found in map source(s).

Then I try to debut the autofs in different mode, But there is no fruitful result. So finally i try to mount the file system directly, while trying I got the error message .cannot lock mtab finally I have found the problem presist in the /etc/mtab. By default mount operation will happen in the following way.
1)kernel update the status into  /proc/mounts
2)/proc/mounts link to /proc/self/mounts
3)/etc/mtab soft link to the /proc/self/mounts
4)from /proc/self/mount will update into df -h and mount command
while mounting the file system it is not properly updated to the /etc/mtab consequence to the df -h also.Later properly create the soft link from /proc/self/mount to the /etc/mtab then all the problem get solved.
Case -1 :
1)/etc/mtab & mount both will synchronize
2)/proc/mounts is the kernel output. If really files system unmounted then only it will release entry from here – if it is unable to unmount use the last unmount umount -l <file-system>
Case -2 :

/root/.gvfs not accessible.
df hang  df -X in this case we can use the strace command.
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7ffff7ff5000, 4096)            = 0
munmap(0x7ffff2130000, 135168)          = 0
open("/usr/share/misc/magic.mgc", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1786800, ...}) = 0
mmap(NULL, 1786800, PROT_READ|PROT_WRITE, MAP_PRIVATE, 3, 0) = 0x7ffff1f9c000
close(3)                                = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 19), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff1f9b000
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffff1f5a000
lstat("/root/.gvfs", ^C <unfinished ...>
root     138183      1  0 Nov20 ?        00:00:00 /usr/libexec//gvfs-fuse-daemon /root/.gvfs
# kill -9 138183 
Once kill the particular .gvfs process file then I am able to do df -h.

 

Post a Comment

0 Comments