LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-16-2004, 04:20 AM   #1
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Rep: Reputation: 30
Automount - releases disks but drives stay mounted


After some struggle I finally got automount working in 9.1 - at least it sort of works. I can put disks in and out quite happily but the drives seem to stay mounted. Entry remains in /etc/mtab and the mounted icon showing in Rox filer, and I am told device is busy if I try to rename it or anything.

One thing I am uncertain of is the absence of /etc/rc.d/init/autofs which all the advice says I should restart. I filled in /etc/auto.master as instructed and made the relevant /etc/auto.* files for each device. I then got it working by doing

# automount -t 10 /mnt/cdrom file /etc/auto.cdrom

I then put this in /etc/rc.d/rc.local and it fires up when I reboot. Autofs module is loaded and being used and I have an automount process running for each device and an entry for each in /etc/mtab like this:

automount(pid2260) /mnt/cdrom autofs rw,fd=5,pgrp=2260,minproto=2,maxproto=3 0 0

The drives seem to mount on booting then stay mounted, but I can put disks in and out with impunity. Any attempt to access the file manager seems to make the drive click for a moment before the window is displayed.

Anyone know what the problem could be? Should my old entries remain in /etc/fstab? I could find nothing about this but tried with and without them commented out and it seemed to make no difference.
 
Old 04-19-2004, 11:34 AM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
The automount program automatically mounts disks/drives when accessed, but only unmounts them after a certain amount of time, default 5 minutes.

/etc/init.d/autofs status will show you how the automount is configured.
 
Old 04-19-2004, 01:22 PM   #3
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Thanks for that. Yes, I set the time delay according to instructions but it seems not to have an effect. I do not have an etc/init.d or any kind of autofs file other than stuff in /usr/src/linux-2.4.22/ and /usr/lib. Everything I read tells me to run /etc/init.d/autofs plus various things like restart etc. Why do I not have it in a standard full Slackware 9.1 install? Anyone know?
 
Old 04-19-2004, 01:28 PM   #4
Nis
Member
 
Registered: Jul 2003
Location: Virginia
Distribution: Ubuntu Hoary (5.04)
Posts: 550

Rep: Reputation: 31
Slackware does not use /etc/init.d (SystemV style init scripts); all init scripts are in /etc/rc.d (BSD style). Any local initializations should be put in /etc/rc.d/rc.local
 
Old 04-19-2004, 01:37 PM   #5
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Thanks Nis, that clarifies things. However, I did check all the /etc/rc.d scripts and found no /etc/rc.d/init/autofs that I was also told I should use. As I said originally, I put my automount scripts in /etc/rc.d/rc.local and that seems to make it work apart from this business. Can you throw any light on why I have no autofs script, or is that just what I have effectively made myself and put in rc.local?
 
Old 04-19-2004, 01:52 PM   #6
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
The documentation says that it unmounts after a certain amount of inactivity. If I'm not wrong that would mean no process has bean in that directory.
Normally when unmounting partitions you couldn't even have a shell who's current working dir is within that partition.

Check with [b]fuser -m <device name or path>[b]
This will show any processes using that directory/file system.
 
Old 04-19-2004, 03:07 PM   #7
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
This may not be relevant, as I do not use autofs, but bear with me!
What follows only has an effect if you have kde running, and probably konqueror
as well, so if you are using roxfiler, JohnKFT, this may well be no use.
In KDE Control centre/KDE Components/Kde Performance under Preloading, there is an
option to select no of instances preloaded. I found that I sometimes had problems unmounting drives unless this is set to 0.

Please ignore if this has no bearing on your case!

tobyl
 
Old 04-19-2004, 04:49 PM   #8
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Well, I do not use kde but it is surprising what can be helpful. Both the last two posts have given me what I think is the answer : [ # fuser -m /dev/cdrom ] gave me the pid of the automount process controlling /mnt/cdrom. Presumably this should not be happening. I also discovered that the entry in /etc/mtab that I quoted above is the automount process and is supplemented by another entry for the device when a disk is inserted. The moment the disk is removed the second entry disappears but these remain:

automount(pid598) /mnt/cdrom autofs rw,fd=5,pgrp=598,minproto=2,maxproto=3 0 0
automount(pid602) /mnt/ftp autofs rw,fd=5,pgrp=602,minproto=2,maxproto=3 0 0
automount(pid600) /mnt/floppy autofs rw,fd=5,pgrp=600,minproto=2,maxproto=3 0 0

So what do we think is happening? Clearly the devices are being mounted and unmounted on demand as expected, but the filer - both ROX and xfm - think they are permanently busy so do not allow me control over them. Just checked with bash and even a terminal claims /mnt/cdrom is busy, so the pid of the automount process must be doing this. Anyone any suggestions?

PS I tried experimentally commenting out the above entries in /etc/mtab and reloading things but it made no difference. I guess the pid of automount is making the machine think the devices are mounted rather than the /etc/mtab entries.
 
Old 04-19-2004, 05:07 PM   #9
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
You should normally not edit the mtab file directly as this is what the mounting tools do. The mtab keeps a record of what is mounted.

What I can see from the man pages you should configure the mount points in /etc/auto.master
There are no references to /etc/fstab so try to comment out the entries corresponding to the auto mounted file system and see if it works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Optical drives don't automount in Slack 10.1 thorney Linux - Newbie 1 08-06-2005 08:26 AM
Automount in LE 2005 cannot access cdrom drives grimlaur Mandriva 6 05-28-2005 06:32 PM
automount cdrom and pen drives mokojin Slackware 3 10-31-2004 02:56 PM
configuring automount to mount CD-ROM drives Locura Linux - Software 5 08-12-2003 10:12 PM
Permissions on FAT32 mounted disks in RH 8 Hdata Linux - Newbie 9 04-21-2003 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration