From owner-freebsd-questions@FreeBSD.ORG Thu Mar 20 13:14:56 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05FFD1065670 for ; Thu, 20 Mar 2008 13:14:56 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr3.xs4all.nl (smtp-vbr3.xs4all.nl [194.109.24.23]) by mx1.freebsd.org (Postfix) with ESMTP id B35168FC21 for ; Thu, 20 Mar 2008 13:14:55 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr3.xs4all.nl (8.13.8/8.13.8) with ESMTP id m2KDEisw011434; Thu, 20 Mar 2008 14:14:45 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id CAA2FB832; Thu, 20 Mar 2008 14:14:43 +0100 (CET) Date: Thu, 20 Mar 2008 14:14:43 +0100 From: Roland Smith To: Da Rock Message-ID: <20080320131443.GD64490@slackbox.xs4all.nl> Mail-Followup-To: Da Rock , freebsd-questions@freebsd.org References: <1205978132.27757.28.camel@laptop2.herveybayaustralia.com.au> <20080320074312.GB59070@slackbox.xs4all.nl> <1206014137.27757.132.camel@laptop2.herveybayaustralia.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AsxXAMtlQ5JHofzM" Content-Disposition: inline In-Reply-To: <1206014137.27757.132.camel@laptop2.herveybayaustralia.com.au> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: removable devices auto umounting X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 13:14:56 -0000 --AsxXAMtlQ5JHofzM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 20, 2008 at 09:55:37PM +1000, Da Rock wrote: > > > I'm just looking into the removable device issue for freebsd. I can s= ee > > > its easy enough to auto mount a removable device (although I could use > > > some help getting sd/xd devices working with my card reader), but the > > > removal seems to come unstuck. > > >=20 > > > I have some barely literates on my systems, so I do need to work this > > > out. Is it possible to use a forced umount to do this? What are the > > > options here? In all honesty, I'm not sure FreeBSD (or any other OS, for that matter) is suitable for 'barely literates'. A computer is not a toaster. > > One (not bullet-proof) workaround might be to use the automounter > > [amd(8)], and have it unmount very quickly after they stop being > > active. This requires setting both the 'cache_duration' and > > 'dismount_interval' options in amd.conf(5) to very low values. >=20 > So by active you mean device access?=20 I mean access to the auto-mounted directory, or files therein. > Or device physical connection? If > its simply access, than that would be perfect- user enters the mount > point,=20 User needs to plug in the device first! And it is actually worse. Depending on if and how the usb device was set up, you need to use the device daX[sY], where X depends on how many other da devices are already in use, and the optional Y depends on how it was sliced (partitioned in DOS parlance).=20 Furthermore, you need to know which kind of filesystem is used. Most thumbdrives are msdosfs, but larger ones might be ntfs as well. For msdosfs, I use:=20 'mount_msdosfs -m 644 -M 755 -o noatime -o sync -o noexec -o nosuid $DEV $D= IR' > Also, what docs/how-to's would you suggest for AMD? I looked at the man > and some freebsd doc pages, but another viewpoint would help. > Specifically some more docs on the settings you mention. I've never used amd, so I can't help you there. :-) =20 > Bullet-proof is not exactly necessary- nice, but not critical. > Suggestions for bullet-proof are very welcome though. What is the worst > that can happen if dismounting is not entirely successful? Keeping in > mind that this is mostly a desktop system. Last time I tried unplugging a USB device before unmounting it I got a kernel panic. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --AsxXAMtlQ5JHofzM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfiY0MACgkQEnfvsMMhpyU8igCfafTeMDmBCMRroWOhCyG5ZqCn aVkAoJ8McajUO1941N0PPVqYQkX01fmx =MZNu -----END PGP SIGNATURE----- --AsxXAMtlQ5JHofzM--