2001-11-29 13:39:56

by Samuel Maftoul

[permalink] [raw]
Subject: umounts and sync

(re-)hello everyone,
I'm currently writing a script for hotplug ieee1394 hard drives.
I'm encountering troubles with something:
my hotplug agent launch a script when you unplug the disk.
This script calls umount.
Am I going to loose datas (as the umount and stuff which are written on
the HD by umount won't be written because the disk isn't here anymore)?
Do you have a solution to avoid this ?
mounting with sync option slows the disk.
I can also do a script: if no activity during 5 sec on the disk, do
sync. (Is it the "sync" command I need to do this ?)
As usually: Thanks for any help.
Sam


2001-11-29 13:49:32

by Bart Hartgers

[permalink] [raw]
Subject: Re: umounts and sync

On 29 Nov, Samuel Maftoul wrote:
> (re-)hello everyone,
> I'm currently writing a script for hotplug ieee1394 hard drives.
> I'm encountering troubles with something:
> my hotplug agent launch a script when you unplug the disk.
> This script calls umount.
[snip]

This is the same problem as with a PC floppy. Users need to know that
you need to unmount first, and then remove the disk. But maybe you can
make hotplug tell the user to put the disk back.

Bart

--
Bart Hartgers - TUE Eindhoven
Get my GPG key at http://etpmod.phys.tue.nl/bart/pubkey.gpg