Messages in this thread | | | Subject | Re: Delay in unmounting a USB pen drive | From | Anton Altaparmakov <> | Date | Wed, 24 Nov 2004 09:34:06 +0000 |
| |
On Wed, 2004-11-24 at 14:55 +0530, Raj wrote: > SuSE kernel 2.6.5: > > My USB pen drive has a vfat FS. When i transfer some files & try to > unmount the drive ( umount /mnt ) , the command appears hung. CTRL+C also > does not work. Only later did i realise that it was actually taking a > longer time ( 10 - 15 sec ) > to unmount. > > My questions are: > - Why is it taking a long time to unmount ? > - Is it safe to remove the pen drive from it's slot when the umount is still in > progress ?? ( I tried this the first time & maybe lucky me, the > files copied were fine )
You are mounting with async flag (or this is the default) which means that all the unwritten data is synced when you do umount. You can verify this by typing "sync" waiting for that to complete and then the umount should be immediate.
You can change this by using the "sync" option to mount which will cause data to be written synchronously and the umount will be instantaneous. Note that this will cause device write to be _much_ slower!
One thing is certain, do NOT unplug before the umount completes or you will corrupt your fs on the stick for sure.
Best regards,
Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |