public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to set udev rule?
Date: Sun, 30 Aug 2009 16:13:11 -0500	[thread overview]
Message-ID: <4A9AEB67.9060906@gmail.com> (raw)
In-Reply-To: <98e072813338e844438b47ec9e95c0fd.squirrel@jesgue.homelinux.org>

Jesús Guerrero wrote:
> 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. And some people use this crap on udev rules to remove the
> volume when they unplug the pendrive. 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.
>
> If you truly want to umount after, you should at least do a sync before
> removing the device. In any case, if you don't follow the logical
> order of the things don't complain if then you find that the files that
> should be there are not there when you need them.
>
> If you truly love risk, just use umount -l, but you have to promise not
> to cry if the fs breaks or your files are not writen when you sudenly
> unplug the device.
>
>   

Basically, if he is going to do this the way he is thinking of doing it,
use cp NOT mv.  o_O  If he uses mv and then unpkugs it without
unmounting or syncing, the file is gone for good.  At least with cp you
still have the original file.

Just thinking this through a little here.

Dale

:-)  :-) 



  reply	other threads:[~2009-08-30 16:04 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 [this message]
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
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=4A9AEB67.9060906@gmail.com \
    --to=rdalek1967@gmail.com \
    --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