Ssh – How to copy big data over network

centoslinuxnetworkingrsyncssh

I have a HP Microserver gen 8 with Centos 7 and only one hard disk in the bay area, 2 TB, mounted as NTFS.

I'm trying to copy files (about 100GB at once) over network from local.

I've tried with the following:

  • via Samba
  • via SCP
  • via Rsync

Common issues along the way for this methods are usually with this error messages:

  • System is read-only with I\O error (I've replaced the hard disk, because more likely it's causing this issue, not sure though)
  • Disk is full (this just saw, and I was using Samba), Disk is 92% empty.
  • mkstemp failed operation not permitted

So I'm thinking maybe there's a better way to copy big data; is there?

Also, i just tried to do this:

rsync -rvz -e "ssh" * abude@192.168.0.106:/folder

and I got this error:

rsync: writefd_unbuffered failed to write 16385 bytes [sender]: Broken pipe (32)
rsync: write failed on "/folder/movie.mkv": Input/output error (5)
rsync error: error in file IO (code 11) at receiver.c(322) [receiver=3.0.9]
rsync: connection unexpectedly closed (490 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/io.c(453) [sender=2.6.9]

Torrent answer couldn't be the only valid way to copy this much of data; I need a Linux based solution, without torrent.

Update:

After @zeppelin suggested to try one big file instead of many 4-5GB files, i've made one big archive using: tar -zcvf movies.tar.gz *

once i had the archive:

ls -alh movies.tar.gz 
-rw-r--r--  1 Abude  staff    77G Nov 11 13:54 movies.tar.gz

I did the rsync and got the following issue:

rsync -avz -e 'ssh' --progress movies.tar.gz abude@192.168.0.106:/nas/media
/etc/profile.d/lang.sh: line 19: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
building file list ... 
1 file to consider
movies.tar.gz
 82671089587 100%   25.36MB/s    0:51:49 (xfer#1, to-check=0/1)
rsync: mkstemp "/nas/media/.movies.tar.gz.ezRUOM" failed: Operation not permitted (1)

sent 82698841857 bytes  received 42 bytes  26586993.06 bytes/sec
total size is 82671089587  speedup is 1.00
rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/main.c(992) [sender=2.6.9]

Best Answer

Update

The permission error (below) boiled down to removing the '-a' (--archive) flag from the rsync command, to prevent it from trying to preserve ownership and permissions on the files copied.

After doing the local 'dd' test, a low-level IO error was detected, probably caused by a faulty disk, resulting in a filesystem corruption.


Operation not permitted (1)

The last error you see is a most probably simple permission issue, i.e. user 'abude' just does not have a write access to /nas/media/), try making this folder public writeable:

 chmod a+rwx /nas/media

and repeat your rsync command.

------- (disregard below, as OP is using a NTFS partition now) -----

Based on this:

I have a HP Microserver gen 8 with Centos 7 and only one hard disk in the >bay area, 2 TB, mounted as fat32.

...

rsync: write failed on "/folder/movie.mkv": Input/output error (5) rsync error: error in file IO (code 11) at receiver.c(322) >>[receiver=3.0.9]

and your later comment

@GMaster any file under ~4GB has no errors. i even can push this number to about 8-10GB but not sure though. – Abude 8 hours ago

I assume is that the problem you have it that you try to rsync (at least some) 4GB+ files to the FAT32 filesystem, which is not possible to do, as this is hard limit on the file size for FAT32.

Maximum file size 2^32 minus 1 bytes

(https://technet.microsoft.com/en-us/library/cc938937.aspx)

So rsync reports you a file IO error:

11     Error in file I/O

(https://linux.die.net/man/1/rsync)

The options you have are:

Related Question