public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dirk Heinrichs <dirk.heinrichs@online.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to set udev rule?
Date: Mon, 31 Aug 2009 18:41:13 +0200	[thread overview]
Message-ID: <200908311841.13365.dirk.heinrichs@online.de> (raw)
In-Reply-To: <200908302326.53203.wonko@wonkology.org>

[-- Attachment #1: Type: Text/Plain, Size: 2354 bytes --]

Am Sonntag 30 August 2009 23:26:52 schrieb Alex Schuster:
> Jesús 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.
>
> Yes, this very rule would be nice to have :)

No, it would not. It can (and most likely will) lead to data loss.

> I do so, it makes me feel better, but I wonder whether it is _really_
> necessary.

Yes, it is. You never know when your data is written to physical storage 
unless you explicitely synced or umounted it while the device was still 
connected.

> I see Windows users do this all the time, without any problem
> yet. Of course, the wait a little after writing to it, but a few seconds
> after the blinking stops seem to be enough.

Usually it is, but you never know. Windows users don't have that broad choice 
of filesystems. They have NTFS and that's it, so they may know they're save. 
Linux filesystems may handle this differently, depending on which one you've 
chosen.

> And people are lazy, I know my
> Linux users _will_ just plug the stick. Using the KDE4 automounter, the
> device will be unmounted automatically in this case,

You mount filesystems, not devices. If you plug the device which holds the 
filesystem you've mounted, the fs can't be umounted anymore. There's nothing 
KDE automounter (aka HAL/DBUS) can do about it.

> but I am looking for a
> solution without KDE4, and as few user interaction as possible. The udev
> mouting rule is nice, but it leaves a lot of mounts when plugging in and
> out repeatedly.

Use the kernel automounter (autofs). It also umounts automatically (after a 
configurable time).

Bye...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  parent reply	other threads:[~2009-08-31 11:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-27  7:22 [gentoo-user] How to set udev rule? Song Zhiwei
2009-08-27 10:01 ` KH
2009-08-28  1:51   ` Song Zhiwei
2009-08-28  3:33     ` David Relson
2009-08-30 17:29       ` Alex Schuster
2009-08-30 19:38         ` Dirk Heinrichs
2009-08-30 20:15           ` Jesús Guerrero
2009-08-30 21:13             ` Dale
2009-08-30 21:26             ` Alex Schuster
2009-08-31  5:38               ` Jesús Guerrero
2009-08-31 14:32                 ` Stroller
2009-08-31 16:41               ` Dirk Heinrichs [this message]
2009-08-31 19:40                 ` Mick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908311841.13365.dirk.heinrichs@online.de \
    --to=dirk.heinrichs@online.de \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox