[PLUG] autofs...

Michael C. Robinson plug_1 at robinson-west.com
Thu Jul 8 09:49:28 UTC 2010


Does autofs auto unmount removable media drives as well?

I've been struggling with bash to count seconds off of the date command
to try and get syntax right before tackling file access times, can't
remember how to get that value by the way.  The thought is, if a file
isn't currently being accessed and it hasn't been accessed for say 6
seconds, then the user probably wants some media to be unmounted.
Clearly when the unmount happens, the link to the auto mounted media
will disappear.  Isn't autofs supposed to take care of unmounting media
for you though?  I thought the --timeout=6 for example in auto.master
indicates how long a device can be mounted and not accessed before it
should be unmounted.

So my auto.master looks like this:

/.autofs/zip        /etc/auto.zip250 --timeout=6
/.autofs/cdrom      /etc/auto.cdrom  --timeout=6
/.autofs/bernoulli  /etc/auto.bern   --timeout=6
/.autofs/floppy     /etc/auto.flop   --timeout=6

And my auto.zip250:

# zip 250 drive
zip		-fstype=auto	:/dev/hdd4

And my auto.cdrom:

# cdrom 
cdrom		-fstype=auto	:/dev/hdc

And my auto.bern:
# bernoulli
bernoulli	-fstype=auto	:/dev/sda4

And finally my auto.flop:

# floppy drive
floppy		-fstype=vfat	:/dev/fd0

I should mention that I'm trying to export this media via samba to a
Windows 98SE box.  I'm wondering if samba is interfering with the
unmounting?

I have a directory called file_vault which is samba exported that
contains soft links to the directories that will exist when the media is
mounted.  Every time I access file_vault remotely, the media mounts.

Oh, strangely enough the drives have to seemingly be loaded at boot or
else the appropriate device files won't exist.

I would be happy with an intuitive way to send the unmount command from
the Windows 98SE box via the mouse.




More information about the PLUG mailing list