From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Mhn6S-0005cW-KQ for garchives@archives.gentoo.org; Sun, 30 Aug 2009 16:18:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C7ECE08F6; Sun, 30 Aug 2009 21:27:01 +0000 (UTC) Received: from mail.askja.de (mail.askja.de [83.137.103.136]) by pigeon.gentoo.org (Postfix) with ESMTP id E26F8E08F6 for ; Sun, 30 Aug 2009 21:27:00 +0000 (UTC) Received: from static-87-79-89-40.netcologne.de ([87.79.89.40] helo=zone.wonkology.org) by mail.askja.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MhrvQ-0007u1-Cm for gentoo-user@lists.gentoo.org; Sun, 30 Aug 2009 23:27:00 +0200 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by zone.wonkology.org with local; Sun, 30 Aug 2009 23:26:57 +0200 id 00010398.4A9AEEA1.0000533E From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How to set udev rule? Date: Sun, 30 Aug 2009 23:26:52 +0200 User-Agent: KMail/1.11.4 (Linux/2.6.28-tuxonice-r3_3; KDE/4.2.4; i686; ; ) References: <200908302138.14457.dirk.heinrichs@online.de> <98e072813338e844438b47ec9e95c0fd.squirrel@jesgue.homelinux.org> In-Reply-To: <98e072813338e844438b47ec9e95c0fd.squirrel@jesgue.homelinux.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908302326.53203.wonko@wonkology.org> X-Archives-Salt: ac5af398-25e4-45d8-ae73-4cb76d81d04d X-Archives-Hash: 05a297ed62d570f6baaeb11cc10c0830 Jes=FAs Guerrero writes: > On Sun, August 30, 2009 21:38, Dirk Heinrichs wrote: > > Am Sonntag 30 August 2009 19:29:39 schrieb Alex Schuster: > >> I have to change the bus from usb to scsi, then it works. But what > >> about unmounting? Is is possible to have it unmounted after I pull the > >> memory stick? > > > > How do want to umount something that's not there anymore? You have to > > umount _before_ you pull it. > > You can force the umount using -l (no, it's not documented in the man > page). You can use this to umount a volume *after* it has been physically > removed. The -l is not necessary here, a simple umount is enough. > And some people use this crap on udev rules to remove the > volume when they unplug the pendrive.=20 Yes, this very rule would be nice to have :) > Then they wonder why the heck > the file is not where it should be. I guess they never heard of cached > writes. > > The correct thing to do is of course to umount it before, > and then unplug it or whatever. I do so, it makes me feel better, but I wonder whether it is _really_=20 necessary. I see Windows users do this all the time, without any problem=20 yet. Of course, the wait a little after writing to it, but a few seconds=20 after the blinking stops seem to be enough. And people are lazy, I know my= =20 Linux users _will_ just plug the stick. Using the KDE4 automounter, the=20 device will be unmounted automatically in this case, but I am looking for a= =20 solution without KDE4, and as few user interaction as possible. The udev=20 mouting rule is nice, but it leaves a lot of mounts when plugging in and ou= t=20 repeatedly. When the system is mostly idle, I guess the writing to the stick would not= =20 be delayed for a long time, so this should be quite safe. At least if the=20 data is not that important. And if there are no writes, I see no problem at= =20 all. There also is the sync option to mount, it should not be used on media with= =20 limited number of write cycles, but I also guess that for my purposes this= =20 would not matter. Wonko