1 |
On Sun, August 30, 2009 21:38, Dirk Heinrichs wrote: |
2 |
> Am Sonntag 30 August 2009 19:29:39 schrieb Alex Schuster: |
3 |
> |
4 |
> |
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. And some people use this crap on udev rules to remove the |
15 |
volume when they unplug the pendrive. Then they wonder why the heck |
16 |
the file is not where it should be. I guess they never heard of cached |
17 |
writes. |
18 |
|
19 |
The correct thing to do is of course to umount it before, |
20 |
and then unplug it or whatever. |
21 |
|
22 |
If you truly want to umount after, you should at least do a sync before |
23 |
removing the device. In any case, if you don't follow the logical |
24 |
order of the things don't complain if then you find that the files that |
25 |
should be there are not there when you need them. |
26 |
|
27 |
If you truly love risk, just use umount -l, but you have to promise not |
28 |
to cry if the fs breaks or your files are not writen when you sudenly |
29 |
unplug the device. |
30 |
|
31 |
-- |
32 |
Jesús Guerrero |