I'm using Ubuntu 17.10.
I formatted an USB pen-drive to NTFS to prepare a Windows7 USB Installer.
I set the bootable flag on this pen-drive and copied the files into it.
EDIT 1: The USB pen-drive is automatically mounted by udev.
umount /dev/sdb1
takes from 10 upto 12 minutes to complete.
Here are the mount options :
$ mount | grep sdb
/dev/sdb1 on /media/mansfeld/Win7_USB_Installer type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
EDIT 2: The cp
operation is not INSTANTANEOUS at all, it took 3 minutes to copy the files to the USB pen-drive.
EDIT 3: The sync
operation (done right after the cp
) took 12 minutes to complete ! But then the umount
will be instantaneous.
For FAT32, (with sync also disabled during mount), I notice the same behaviour.
Any ideas why it takes so long to unmount NTFS USB pendrive ?
sudo umount /dev/sdb1
; Maybe there are some buffered data, that must be written to the drive before it can be unmounted. You can flush the buffers withsync
; Aftersync
has returned to prompt, unmounting should be fast. – sudodus Mar 23 '18 at 18:53sync
command. – SebMa Mar 25 '18 at 09:34cp
returns to prompt), there are still lots of data in the buffer. If you runsync
right after thecp
command, and wait untilsync
returns to prompt, the unmount should be fast. Please try that :-) – sudodus Mar 26 '18 at 14:50