Ubuntu: why the "extract" function on a USB flash drive leaves broken files

I record two movies on a USB flash drive via Nautilus, each ~2 GB in size.

First, the progress bar is shown, the first hundreds of megabytes are recorded almost instantly, then the speed drops sharply. At the end, the progress bar window closes. If you then click on the flash drive icon and select "eject", the "disk was successfully extracted" popup is displayed.

enter a description of the image here

But usually the second file gets broken somewhere in the middle. Question: why? I expect the OS to throw off the I / O buffer and only then allow the extraction. If you do sudo sync, there is no problem. If you do not do it, it is consistently repeated.

PS. Ubuntu 16.04

dmesg

[  656.566475] sd 4:0:0:0: Attached scsi generic sg2 type 0
[  656.567021] sd 4:0:0:0: [sdc] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
[  656.567986] sd 4:0:0:0: [sdc] Write Protect is off
[  656.567989] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[  656.568893] sd 4:0:0:0: [sdc] No Caching mode page found
[  656.568899] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[  656.573524]  sdc: sdc1
[  656.576879] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[  666.791088] usb 2-1.2: USB disconnect, device number 4
[  669.984170] usb 2-1.2: new high-speed USB device number 5 using ehci-pci
[  670.095071] usb 2-1.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[  670.095074] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  670.095076] usb 2-1.2: Product: Silicon-Power
[  670.095078] usb 2-1.2: Manufacturer: UFD 2.0
[  670.095079] usb 2-1.2: SerialNumber: 1402036101500139
[  670.095498] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[  670.095862] scsi host4: usb-storage 2-1.2:1.0
[  671.506618] scsi 4:0:0:0: Direct-Access     UFD 2.0  Silicon-Power8G  1100 PQ: 0 ANSI: 0 CCS
[  671.507034] sd 4:0:0:0: Attached scsi generic sg2 type 0
[  671.507690] sd 4:0:0:0: [sdc] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
[  671.508541] sd 4:0:0:0: [sdc] Write Protect is off
[  671.508545] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[  671.509438] sd 4:0:0:0: [sdc] No Caching mode page found
[  671.509446] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[  671.515803]  sdc: sdc1
[  671.519015] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[  699.075190] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  699.075192] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[  699.075194] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[  699.075196] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 58 00 00 18 00
[  699.075198] blk_update_request: I/O error, dev sdc, sector 88 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 0
[  699.076443] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  699.076444] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[  699.076446] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[  699.076448] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 78 00 00 38 00
[  699.076450] blk_update_request: I/O error, dev sdc, sector 120 op 0x0:(READ) flags 0x80700 phys_seg 7 prio class 0
[  699.078317] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  699.078320] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[  699.078322] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[  699.078323] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 b8 00 00 90 00
[  699.078325] blk_update_request: I/O error, dev sdc, sector 184 op 0x0:(READ) flags 0x80700 phys_seg 18 prio class 0
[  699.079568] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  699.079571] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[  699.079574] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[  699.079576] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 58 00 00 08 00
[  699.079579] blk_update_request: I/O error, dev sdc, sector 88 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[  699.079582] Buffer I/O error on dev sdc1, logical block 4, async page read
[  699.080831] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  699.080832] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[  699.080834] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[  699.080835] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 b8 00 00 08 00
[  699.080837] blk_update_request: I/O error, dev sdc, sector 184 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[  699.080839] Buffer I/O error on dev sdc1, logical block 16, async page read
[  864.278331] usb 2-1.2: USB disconnect, device number 5
[ 4505.817188] usb 2-1.2: new high-speed USB device number 6 using ehci-pci
[ 4505.927791] usb 2-1.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[ 4505.927795] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4505.927797] usb 2-1.2: Product: Silicon-Power
[ 4505.927798] usb 2-1.2: Manufacturer: UFD 2.0
[ 4505.927800] usb 2-1.2: SerialNumber: 1402036101500139
[ 4505.928229] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 4505.928574] scsi host4: usb-storage 2-1.2:1.0
[ 4507.418940] scsi 4:0:0:0: Direct-Access     UFD 2.0  Silicon-Power8G  1100 PQ: 0 ANSI: 0 CCS
[ 4507.419397] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 4507.420173] sd 4:0:0:0: [sdc] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
[ 4507.420999] sd 4:0:0:0: [sdc] Write Protect is off
[ 4507.421002] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 4507.421896] sd 4:0:0:0: [sdc] No Caching mode page found
[ 4507.421904] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[ 4507.428405]  sdc: sdc1
[ 4507.431647] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[ 5421.829958] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5421.829961] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[ 5421.829963] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 5421.829966] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 78 04 18 00 00 08 00
[ 5421.829969] blk_update_request: I/O error, dev sdc, sector 7865368 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[ 5421.831829] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5421.831832] sd 4:0:0:0: [sdc] tag#0 Sense Key : Not Ready [current] 
[ 5421.831834] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Medium not present
[ 5421.831837] sd 4:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 78 04 18 00 00 08 00
[ 5421.831839] blk_update_request: I/O error, dev sdc, sector 7865368 op 0x0:(READ) flags 0x0 phys_seg 8 prio class 0
[ 5421.831843] Buffer I/O error on dev sdc1, logical block 7865312, async page read
[ 5421.831845] Buffer I/O error on dev sdc1, logical block 7865313, async page read
[ 5421.831847] Buffer I/O error on dev sdc1, logical block 7865314, async page read
[ 5421.831849] Buffer I/O error on dev sdc1, logical block 7865315, async page read
[ 5421.831850] Buffer I/O error on dev sdc1, logical block 7865316, async page read
[ 5421.831852] Buffer I/O error on dev sdc1, logical block 7865317, async page read
[ 5421.831853] Buffer I/O error on dev sdc1, logical block 7865318, async page read
[ 5421.831855] Buffer I/O error on dev sdc1, logical block 7865319, async page read
[ 5429.178684] usb 2-1.2: USB disconnect, device number 6
[ 5431.780821] usb 2-1.2: new high-speed USB device number 7 using ehci-pci
[ 5431.891402] usb 2-1.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[ 5431.891405] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5431.891407] usb 2-1.2: Product: Silicon-Power
[ 5431.891408] usb 2-1.2: Manufacturer: UFD 2.0
[ 5431.891410] usb 2-1.2: SerialNumber: 1402036101500139
[ 5431.891867] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 5431.892187] scsi host4: usb-storage 2-1.2:1.0
[ 5433.361870] scsi 4:0:0:0: Direct-Access     UFD 2.0  Silicon-Power8G  1100 PQ: 0 ANSI: 0 CCS
[ 5433.362263] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 5433.363053] sd 4:0:0:0: [sdc] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
[ 5433.363954] sd 4:0:0:0: [sdc] Write Protect is off
[ 5433.363958] sd 4:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 5433.364903] sd 4:0:0:0: [sdc] No Caching mode page found
[ 5433.364921] sd 4:0:0:0: [sdc] Assuming drive cache: write through
[ 5433.369906]  sdc: sdc1
[ 5433.373265] sd 4:0:0:0: [sdc] Attached SCSI removable disk

mtab:

/dev/sdc1 /media/hostel/2571E5907D95FE34 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
 0
Author: Total Pusher, 2020-07-09

1 answers

The NTFS file system is implemented in basic things, perhaps synchronization with disk I / O is not completed in your version. For example, there are still no utilities for checking the fs. To cure a USB flash drive with ntfs sometimes it is required 2 times to insert it into Windows and perform a check after long use in linux. I recommend trying exFAT or vFAT - they are better suited for portable devices.

As I assumed - the fuse driver. This driver is executed as a separate the program is not in the kernel and the kernel has no idea about its synchronization with the disk. You can try to install the driver ntfs-3g or vice versa - I already forgot how it is more correct.

 1
Author: eri, 2020-07-09 22:44:10