Well, if anyone is still interested in some news on my original problem, I did some tests with an old JMicron USB<->SATA/PATA bridge I dug up in the closet.
The bridge can take external power (5V) and connects to the disk by simple SATA cable so in the end I was able to completely eliminate power dependency by powering both the bridge and the SSD from external power supply (5V/12V).
I also disconnected all other USB peripherals (= TV tuner, keyboard), having just ethernet and the bridge connected.
I formatted the drive with two partitions, one ext4 one ntfs, mounted both partitions in OSMC and run SFTP transfers from both partitions (i.e. copying recordings from RPi to my Windows machine), using Filezilla configured for 2 simultaneous transfers.
-
running the test from ext4 did not show any problem, I was able to transfer approx 10 GB of data in approx 13 files while almost maxing ethernet port speed at 20 MiB/s.
-
running the test from ntfs partition gave the results as described in my original post. The transfers started and after approx. 5 seconds came to halt.
FWIW I would like to mention that I configured Filezilla with 120 seconds timeout. Which means, once the connection halts and there is no activity for 120 seconds, the SFTP client disconnects from the server, but since there are still some transfers in the queue it immediately reconnects and tries to continue the transfers. Right after the reconnection there is a small time frame of a fraction of a second where the transfer continues and then it halts again until a new timeout.
The logs (journalctl, dmesg) do not show anything.
If I mount the FS with debug option manually (udisks does not allow debug for some reason), like this:
osmc@htpi:~$ sudo mount /dev/sda1 -o debug
Version 2016.2.22AR.1 integrated FUSE 28
Mounted /dev/sda1 (Read-Write, label "SamsungEVO", NTFS 3.1)
Cmdline options: rw,noatime,debug,nofail
Mount options: rw,nofail,allow_other,nonempty,noatime,fsname=/dev/sda1,blkdev,blksize=4096
Ownership and permissions disabled, configuration type 7
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.26
flags=0x001ffffb
max_readahead=0x00020000
INIT: 7.18
flags=0x00000841
max_readahead=0x00020000
max_write=0x00020000
unique: 1, error: 0 (Success), outsize: 40
<...etc...>
and the corresponding /etc/fstab
osmc@htpi:~$ cat /etc/fstab
/dev/mmcblk0p1 /boot vfat defaults,noatime,noauto,x-systemd.automount 0 0
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/mmcblk0p2 / ext4 defaults,noatime 0 0
UUID="8c06d108-f71e-474f-a876-5ae42aa1f3bc" /mnt/SamsungEVO ext4 defaults,nofail,noatime,x-systemd.automount 0 0
UUID="E452860F5285E6A0" /mnt/SamsungEVO ntfs defaults,nofail,noatime,x-systemd.automount 0 0
I do not see any error in the ntfs debug log, all operations are reported with success and then it simply dies/timeouts.
The time it takes to stall/die is quite volatile and can be from few seconds to minute and half, but it halts eventually.