Fedora 44 WS GNOME doesn't copy all files to NTFS

Hello all

I just had a really odd problem. I copied some video files to my ext USB NTFS drive to move them to my other PC, and it only copied the last one of the 6 files.

Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#4 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#4 CDB: Write(16) 8a 00 00 00 00 00 41 fc 71 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107063136 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378796, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378797, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378798, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378799, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378800, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378801, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378802, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378803, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378804, lost async page write
Oct 17 18:46:16 fedora kernel: Buffer I/O error on dev sda2, logical block 138378805, lost async page write
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#5 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#5 CDB: Write(16) 8a 00 00 00 00 00 41 fc 75 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107064160 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#6 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#6 CDB: Write(16) 8a 00 00 00 00 00 41 fc 79 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107065184 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: device offline error, dev sda, sector 1107083616 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#7 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#7 CDB: Write(16) 8a 00 00 00 00 00 41 fc 7d 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107066208 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: device offline error, dev sda, sector 1107084640 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#8 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#8 CDB: Write(16) 8a 00 00 00 00 00 41 fc 81 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107067232 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: device offline error, dev sda, sector 1107085664 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#9 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: device offline error, dev sda, sector 1107086688 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#9 CDB: Write(16) 8a 00 00 00 00 00 41 fc 85 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: I/O error, dev sda, sector 1107068256 op 0x1:(WRITE) flags 0x904000 phys_seg 128 prio class 2
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#10 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#10 CDB: Write(16) 8a 00 00 00 00 00 41 fc 89 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#11 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#11 CDB: Write(16) 8a 00 00 00 00 00 41 fc 8d 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#12 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#12 CDB: Write(16) 8a 00 00 00 00 00 41 fc 91 60 00 00 04 00 00 00
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#13 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
Oct 17 18:46:16 fedora kernel: sd 11:0:0:0: [sda] tag#13 CDB: Write(16) 8a 00 00 00 00 00 41 fc 95 60 00 00 04 00 00 00

Looking at the Journal, i’m not sure what these errors tell me :thinking:

Is there a really long delay on writing to the disk and that’s why the other files didn’t get copied?

I disconnected the drive when i saw the move was completed.

I moved the files via Nemo, which i like better than the Nautilus. But if there’s a problem, then it’s not that good :face_with_peeking_eye:

All the best
Carsten

Red Hat has some documentation on this error here: What is the meaning of "lost async page write" or "lost page write due to I/O error" ? - Red Hat Customer Portal
Sounds like an issue with the USB drive (or USB controller), hard to know. But I would not trust this combination for data transfer.

I would test another USB port on the motherboard, that goes through a different USB controller, if possible. And another USB drive. See if the issues are replicated in one of those combinations.

And personally, I try to avoid writing to NTFS volumes from Linux.

Agreed it looks like a hardware issue.

It should work. I’m not aware of issues needing fixing around NTFS.

Hmm, the link doesn’t mention NTFS problems.

And also it looks like there can be many sources to it.

Is there any way to narrow it down?

The log files mentioned under /var/log/messages doesn’t show anything, as the last one made is a week ago.

I would try this, as mentioned:

I would test another USB port on the motherboard, that goes through a different USB controller, if possible. And another USB drive. See if the issues are replicated in one of those combinations.

Yes, it is most likely not a NTFS-specific issue in this case. That was just from personal experience and a general recommendation.

That’s legacy place to look which may or may not contain recent logs.

To see the system journal logs use

journalctl

And to use user journal logs use

journalctl --user

See man journalctl for useful options.

I found the skdump command and got this. I’m not sure if there’s anything in the SMART data that tells anything.

Overall Status: GOOD
ID# Name                        Value Worst Thres Pretty      Raw            Type    Updates Good Good/Past
  1 raw-read-error-rate          83    64     6   219120487   0x67830f0d0000 prefail online  yes  yes 
  3 spin-up-time                 97    95     0   n/a         0x000000000000 prefail online  n/a  n/a 
  4 start-stop-count             87    87    20   13340       0x1c3400000000 old-age online  yes  yes 
  5 reallocated-sector-count    100   100    10   0 sectors   0x000000000000 prefail online  yes  yes 
  7 seek-error-rate              77    61    45   49742342    0x0602f7020000 prefail online  yes  yes 
  9 power-on-hours               87    87     0   1.4 years   0x092f00008f9d old-age online  n/a  n/a 
 10 spin-retry-count            100   100    97   0           0x000000000000 prefail online  yes  yes 
 12 power-cycle-count            88    88    20   13205       0x953300000000 old-age online  yes  yes 
183 runtime-bad-block-total     100   100     0   0           0x000000000000 old-age online  n/a  n/a 
184 end-to-end-error            100   100    99   0           0x000000000000 old-age online  yes  yes 
187 reported-uncorrect          100   100     0   0 sectors   0x000000000000 old-age online  n/a  n/a 
188 command-timeout             100    98     0   4295032851  0x130001000100 old-age online  n/a  n/a 
189 high-fly-writes             100   100     0   0           0x000000000000 old-age online  n/a  n/a 
190 airflow-temperature-celsius  65    50    40   35.0 C      0x230023240000 old-age online  yes  yes 
191 g-sense-error-rate          100   100     0   1           0x010000000000 old-age online  n/a  n/a 
192 power-off-retract-count     100   100     0   570         0x3a0200000000 old-age online  n/a  n/a 
193 load-cycle-count             92    92     0   17633       0xe14400000000 old-age online  n/a  n/a 
194 temperature-celsius-2        35    50     0   35.0 C      0x230000000400 old-age online  n/a  n/a 
195 hardware-ecc-recovered       83    64     0   219120487   0x67830f0d0000 old-age online  n/a  n/a 
197 current-pending-sector      100   100     0   0 sectors   0x000000000000 old-age online  n/a  n/a 
198 offline-uncorrectable       100   100     0   0 sectors   0x000000000000 old-age offline n/a  n/a 
199 udma-crc-error-count        200   200     0   0           0x000000000000 old-age online  n/a  n/a 
240 head-flying-hours           100   253     0   10.4 months 0x361d00004da9 old-age offline n/a  n/a 
241 total-lbas-written          100   253     0   758491.938 TB 0x07335a430500 old-age offline n/a  n/a 
242 total-lbas-read             100   253     0   1305212.323 TB 0xabd8850e0900 old-age offline n/a  n/a 
254 attribute-254               100   100     0   n/a         0x000000000000 old-age online  n/a  n/a 

How will i know the controller part, is all USB on the back of the motherboard the same?

I have a couple on the front which i guess is a different one?

Do you have USB-3 ports (the blue ones)? If so try that.

The drive is in a USB3 port.

I just tried moving again, and it looks like it’s not done moving/copying the files when it says it is, as i tried unplugging the drive when it looked done.

It gave me an error saying that there was a problem copying a file.

So is there a very long delay on writing to the drive, and how can i change that?

EDIT: It’s a total of 10GB

I’m not a Gnome user, but there should be an “Eject Disk” in the tool bar that allows you to safely eject the USB stick. Are you using that tool?

The data goes into kernel buffer in RAM then is written out to the USB stick.
You just have to wait for the data to be written.

Back and front are almost always different controllers. Even on the back, different ports are often handled by different controllers. Usually your motherboard manual will show you which ports are handled by which controller. Otherwise you can cross-reference using lspci and lsusb.

But this is the actual issue. Looking into it a bit, it looks like a common problem with slower USB devices when copying a lot of data. It’s caused by the write cache, some suggest disabling it for removable devices, although that has a performance impact. I’m not sure what the best practice is for configuring this to be honest, hopefully someone more knowledgeable on the topic can comment. Did you try using the sync command before removing the drive?

Yes i read about someone asking about the caching, but was advised not to do it, as data loss could happen. But i don’t know how big of a problem that is in reality.

There’s an odd thing i discovered trying to find out more. Nautilus says i don’t have permission to paste to the drive, though looking at permission, i clearly have all needed.

But using Nemo, there’s no such warning :thinking:

Is there some sort of hidden permission problem going on, not that i know how it would have appeared, as i never have had this problem before.

If you are using normal apps to copy to the USB stick then caching is happening.

You need to find the “Safe Eject” button in the gnome UI.
And do not unplug the stick until the “Safe Eject” says you are safe to do so.

If you do not then you face data loss and maybe corruption of the file system.

As I said I’m not a Gnome user … a web search found this doc. Safely remove an external drive

When it says it is done, that only means it is done reading from the source into the buffer.

It still takes quite some additional time to write from the buffer onto the usb device.

Have patience and wait a few minutes (or longer if the files are large) then only remove the device by safely ejecting it before physically disconnecting it.

I believe M$ O/S uses the equivalent to the sync option so files are written directly to USB drives.

You could add the sync option in /etc/fstab and force the Linux kernel to write data and metadata to your USB drive immediately instead of using RAM caching (async, which is the default).

Last time I tried it wasn’t any quicker, maybe even slower than async.

Thank you @barryascott and @computersavvy too :slight_smile:

Yes i read that it’s slower, they say - but when it just looks faster because it then continues writing in the background, then i don’t see either one faster or slower.

But i’m starting to get more annoyed with Fedora, as it behaves more like WinSUCKS and does things i didn’t ask it it too. My GRUB menu is suddenly gone and i’m also not allowed to enter my BIOS anymore. That has come with the later updates.

I’ll make a new topic on that, and if this can’t be easily fixed, then Fedora is out. I didn’t switch one OS-mess to get another one.

sync is always slower, and it also has to update some blocks repeatedly, so if used with NAND devices it performs unnessecasy writes adding to wear of the NAND cells.
What’s the issue here anyway? You should not disconnect a device w/o umounting the filesystem first.
If you do a sync after cp then you would observe a delay with sync.
It’s the same with umount <mount_point>. Kernel has to write the dirty cache blocks first, before it can safely umount the filesystem.

WIndows has the removal policy called quick removal, that disables write-caching for removable devices. Default is disabled, to protect the vast majority of uninformed users from corrupting the filesystem.

However, on windows 11 the device is marked dirty until it is disconnected using the ‘eject’ function. If disconnected without using eject the next time it is connected windows will tell the user it needs repaired. This happens every time AFAICT.

I just recently encountered this since fedora does not complain the same way.

Maybe Linux uses a different dirty bit. If the dirty bit is set on a file system, the fsck process is run in the file system before it is mounted.