From owner-freebsd-questions@FreeBSD.ORG Thu Oct 23 01:07:45 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9762316A4BF for ; Thu, 23 Oct 2003 01:07:45 -0700 (PDT) Received: from antsrv1.ant.uni-bremen.de (antsrv1.ant.uni-bremen.de [134.102.176.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25BD143FBF for ; Thu, 23 Oct 2003 01:07:42 -0700 (PDT) (envelope-from rebehn@ant.uni-bremen.de) Received: from taipeh.ant.uni-bremen.de ([134.102.176.3] helo=ant.uni-bremen.de) by antsrv1.ant.uni-bremen.de with esmtp (Exim 4.22) id 1ACaVK-0008cv-CI; Thu, 23 Oct 2003 10:07:34 +0200 Message-ID: <3F977031.7000204@ant.uni-bremen.de> Date: Thu, 23 Oct 2003 08:07:45 +0200 From: Heinrich Rebehn User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4.1) Gecko/20031013 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Christopher T. Johnson" References: <20031022143900.B21DBA@catapult.CyberPaladin.com> In-Reply-To: <20031022143900.B21DBA@catapult.CyberPaladin.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Automatic mounting of removable meadia X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2003 08:07:45 -0000 Christopher T. Johnson wrote: >>Heinrich Rebehn wrote: >> >> >>>Yes. Although it does not provide automatic mounting upon insertion of >>>the disk (like windows does), it would be a solution. >>>Unfortunately "man amd" does not say anything about the format of the >>>map for a local device and i was unable to find anything in >>>/usr/share/examples. Can anyone give me an example? >> >>This article provides a tutorial for adding this functionality using amd. >>It may be a little out-of-date, but it has worked for me in the past. >> >> http://www.daemonnews.org/200202/automounting.html >> >>This solution mounts the media on access, and unmounts it on quiescence. >>Not exactly "like windows does", but still useful. >> >>Hope this helps. >> >>~brian > > > I use amd for doing just this. it works for most cases. My map file looks like > cdrom type:=cdfs;dev:=/dev/acd0c;addopts:=ro > floppy type:=pcfs;dev:=/dev/fd0 > zip type:=ufs;dev:=/dev/da0s1a > pczip type:=pcfs;dev:=/dev/da0s4 > pczipF type:=pcfs;dev:=/dev/da0 > flash type:=pcfs;dev:=/dev/da0s1 > > (minus the NFS filesystems) > > This works for everything but the type:=ufs. When amd mounts a unix filesystem > it will never unmount it. I had to patch amd to unmount ufs. > > My amd.conf is the default. The parameters for amd are: > /usr/sbin/amd -p -a /.amd_mnt -l syslog /u /etc/amd.u > > Best, > -Chris > Thank you very much, it works perfect. I also added "-c 5 -w 10" to have the disk quickly unmounted when it is no longer used. "man (8) amd", as other posters suggested does not say anything about the format of the maps. Also, thanks for the link to the tutorial in deamonnews, but the solution provided above looks simpler to me Heinrich