Removable media behaviour

Joao Pedro Clemente jpcl at
Sun Apr 23 09:02:17 BST 2006

Yes, I supose that if ones copies a very large file for a slow pen we'll
get a visible slowdown... but what about "flush decices on user logout"?
It would be a one-time "slowdown", and none-existant if the kernel had
already synced stuff in the past (if one had written thing a long tome
ago). The "option b)" that I proposed is a "flush on logout" plus some
other extra steps.

About that flush delay: Do you know a way to configure it by mountpoint,
not applying it to all the system? It's a mount option? I've never seen
it.. If there is one, I believe it is independent of the filesystem.

Thanks for your comment
(Somehow I feel that this 'issue' doesn't affect much people on this
mailing list :-p )

		        	Joao Pedro Clemente
        			jpcl @

On Sat, 22 Apr 2006, [UTF-8] Hervé Fache wrote:

> Mounting 'sync' makes things really slow at times. Maybe it should be
mounted with a very short flush delay (don't know whether all file
systems support that though), like 2-5 seconds, just to leave a bit of
breathing space to the kernel.

2006/4/19, Joao Pedro Clemente <jpcl at>:
> Hi all. I think this issue is generic to (k)Ubuntu, if you dont want to
> discuss it here, well, I've tried. (Do you think I should move it to other
> Mailing list? Which one?)
> I was testing the behaviour of removable media handling (usb memory pen)
> and if I would like to propose one of these things, wich I think are
> reasonable:
> a) that usb pen (removable media) get mounted with "sync" option. It would
> avoid data loss if the user plugs it out.
> if this is not reasonable because "one must educate users", then, at
> least:
> b) that usb pen (removable media) get synced/umounted automatically on
> user logout. There are various reasons for me to accept this one:
>  - I taugth the user that it must logout. The session ended, so its data
> must be flushed. Seems logic to me.
>  - It would solve the problem of someone logging out with an inserted pen,
> and then log in as another user. If my tests were correct, the cenario I just
> described will prevent the 2nd user to use the pen drive as it is mounted
> with 1rst user permissions.
> If I understood the behaviour of removable media with (k)ubuntu, it is
> now like this:
>  Step 1 - The user plugs in the memory pen.
>  Step 2 - The system detects the plug
>    -  IF there is a user "A" logged, the pen will be mounted for user "A".
>    -  IF not, the system does nothing untill some user logs in. So, when
> user logs in, the system also checks "hum, was there a media insertion
> that is unassigned? Let me assign it now to the user that is logging in"
>  Step 3 - The user logs out. System does nothing
> The thing is, if these steps are taken, and if some other user logs in, we
> have a problem. The problem is that the media is "assigned" to an user
> that is not the one using the machine. So, the new user:
>  - Cannot eject the cd-rom
>  - Cannot umount the pen-drive
>  - Cannot write to the currently existant pen-drive (it has no
> permissions) - actually it cannot even read the pen contents!
>  - Cannot go around this by plugging the pen out and in again, as this
> would make it lose the data (modified by the previous user) that is still
> not synced.
> Have I explained myself? Do you need me to detail the test procedure to
> reproduce this problem? Does it seem of any importance? What do you people
> think about this?
> Thanks for you time!
> --
>                                 Joao Pedro Clemente
>                                 jpcl @
>                                         (when not working out)
>                                         (when not sleeping)
>                                         (when not surfing)
>                                         (when not ... ;)
> --
> kubuntu-devel mailing list
> kubuntu-devel at

In a world without walls and fences, who needs Windows and Gates?

More information about the kubuntu-devel mailing list