Gentoo Archives: gentoo-user

From: Dirk Heinrichs <dirk.heinrichs@××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to set udev rule?
Date: Mon, 31 Aug 2009 11:32:26
Message-Id: 200908311841.13365.dirk.heinrichs@online.de
In Reply to: Re: [gentoo-user] How to set udev rule? by Alex Schuster
1 Am Sonntag 30 August 2009 23:26:52 schrieb Alex Schuster:
2 > Jesús Guerrero writes:
3 > > On Sun, August 30, 2009 21:38, Dirk Heinrichs wrote:
4 > > > Am Sonntag 30 August 2009 19:29:39 schrieb Alex Schuster:
5 > > >> I have to change the bus from usb to scsi, then it works. But what
6 > > >> about unmounting? Is is possible to have it unmounted after I pull the
7 > > >> memory stick?
8 > > >
9 > > > How do want to umount something that's not there anymore? You have to
10 > > > umount _before_ you pull it.
11 > >
12 > > You can force the umount using -l (no, it's not documented in the man
13 > > page). You can use this to umount a volume *after* it has been physically
14 > > removed.
15 >
16 > The -l is not necessary here, a simple umount is enough.
17 >
18 > > And some people use this crap on udev rules to remove the
19 > > volume when they unplug the pendrive.
20 >
21 > Yes, this very rule would be nice to have :)
22
23 No, it would not. It can (and most likely will) lead to data loss.
24
25 > I do so, it makes me feel better, but I wonder whether it is _really_
26 > necessary.
27
28 Yes, it is. You never know when your data is written to physical storage
29 unless you explicitely synced or umounted it while the device was still
30 connected.
31
32 > I see Windows users do this all the time, without any problem
33 > yet. Of course, the wait a little after writing to it, but a few seconds
34 > after the blinking stops seem to be enough.
35
36 Usually it is, but you never know. Windows users don't have that broad choice
37 of filesystems. They have NTFS and that's it, so they may know they're save.
38 Linux filesystems may handle this differently, depending on which one you've
39 chosen.
40
41 > And people are lazy, I know my
42 > Linux users _will_ just plug the stick. Using the KDE4 automounter, the
43 > device will be unmounted automatically in this case,
44
45 You mount filesystems, not devices. If you plug the device which holds the
46 filesystem you've mounted, the fs can't be umounted anymore. There's nothing
47 KDE automounter (aka HAL/DBUS) can do about it.
48
49 > but I am looking for a
50 > solution without KDE4, and as few user interaction as possible. The udev
51 > mouting rule is nice, but it leaves a lot of mounts when plugging in and
52 > out repeatedly.
53
54 Use the kernel automounter (autofs). It also umounts automatically (after a
55 configurable time).
56
57 Bye...
58
59 Dirk

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] How to set udev rule? Mick <michaelkintzios@×××××.com>