To whom it may regard,
I have a USB drive attached to my openwrt router. Over there, I have some files that my jellyfin machine is trying to access. I have been experiencing random changes of system mount options from read-write to read-only.
I had formatted the drive as ext4 to avoid this kind of issues, but it seems to be worse than when I had NTFS.
Also unmounting gets difficult, since I get errors such as:
umount: /mnt/hddrouter: target is busy.
>> ntfsfix /dev/sda1
Mounting volume... NTFS signature is missing.
Failed to sync device /dev/sda1: I/O error
FAILED
Attempting to correct errors... NTFS signature is missing.
Failed to sync device /dev/sda1: I/O error
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
The alternate bootsector is usable
Set sector count to 1953521663 instead of 31477759
Rewriting the bootsector
The boot sector has been rewritten
Failed to fsync device /dev/sda1: I/O error
Error opening '/dev/sda1': Resource busy
Volume is corrupt. You should run chkdsk.
Unplugging, re-plugging and remounting the usb drive does work temporarily. Then I play something on Jellyfin and after a while I get errors since the drive gets in read-only mode from read-write mode.
I/O error almost always means hardware failure, such as an interface connection problem or worn-out flash. USB stick drives are not intended for frequent writing and also don't have much if any redundancy (like SSDs) to work around wear out. They basically die like this.
I don't really have Linux on my main laptop, only on my proxmox server. The proxmox server is accessing the files on the USB HDD that is set to operate as an NFS share.
Before, I had a NTFS file system and I could check the USB HDD on my main laptop. Nothing seriously wrong back then. As I switched to ext4 I expected and saw a slight performance upgrade
There is limited downstream power avaialble through the USB ports on devices such as the FriendlyElec NanoPi R4S. Does the HD enclosure have it's own power source and it is working correctly? Flakey power can cause intermiitant errors.
The HD enclosure doesn't have its own power source.
The power for the router comes from whatever old charger I had lying around with a random but newer USB-C cable.
Would a better charger help? e.g. Raspberry PI usb-c charger
First: make sure that the R4S gets enough power. Don't take any charger: the more amps are drawn the more the voltage will go down. This causes failures.
A good quality power supply will hold 5 V even if the maximum amps are drawn.
Second: I second the statement of @DBAA (There is limited downstream power avaialble through the USB ports).
I did both things, good quality "charger"/power-supply meant for raspberry PIs and new HD enclosure with its own power source. The problem disappeared. Thanks.