Operating System - Linux
1832343 Members
2931 Online
110041 Solutions
New Discussion

autofs didnt work-- plz help asap

 
Maaz
Valued Contributor

autofs didnt work-- plz help asap

# cat /etc/autofs.master
/mnt/cdrom /etc/auto.cdrom --timeout=15

# cat /etc/auto.cdrom
cdrom -fstype=iso9660,ro :/dev/cdrom

# service autofs status
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout 15 /mnt/cdrom file /etc/auto.cdrom

Active Mount Points:
--------------------
/usr/sbin/automount --timeout 15 /mnt/cdrom file /etc/auto.cdrom

# mount
.
.
.
automount(pid512) on /mnt/cdrom type autofs (rw,fd=5,pgrp=512,minproto=2,maxproto=3)

Now i insert the cd into the cdrom drive, and then
# ls -l /mnt/cdrom
total 0

'ls -l /mnt/cdrom' didnt mount the cd ... so obviously it also didnt show me the contents of cd
plz help ... i am not able to configure autmount
so plz point out where i m doing mistake ? or what should i do ?
4 REPLIES 4
Maaz
Valued Contributor

Re: autofs didnt work-- plz help asap

OS = rhel 3.0

Thanks n Regards
Maaz
NiCK_76
Respected Contributor

Re: autofs didnt work-- plz help asap

Hi Maaz,

The following config file is exactly,
cat /etc/autofs.master
/misc /etc/auto.misc --time=60

cat /etc/auto.misc
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

Perform command "ls -l /misc/cd" will show file of cdrom.


NiCK
just for fun
NiCK_76
Respected Contributor

Re: autofs didnt work-- plz help asap

Hi Maaz

Before you perform command "ls -l /misc/cd",you should restart autofs service.

NiCK
just for fun
Maaz
Valued Contributor

Re: autofs didnt work-- plz help asap

Millions of Thanx Dear NiCK for such a prompt reply.
What I was doing wrong is that i issue 'ls -l /mnt/cdrom' but in my case the correct should be 'ls -l /mnt/cdrom/cdrom', i.e i was not providing the 'key' after the mount point. And the key in my case is 'cdrom'
# cat /etc/auto.cdrom
cdrom -fstype=iso9660,ro :/dev/cdrom

Anyway many thanx NiCK.

Regards
Maaz