rsync : write failed - No space left on device (28)

Solution 1:

I had the same issue, the destination directory had enough space but I'd get "No space left on device". Turns out rsync copies the file to somewhere else first, then moves it to the destination directory. To change this behavior, use --inplace.

According to https://download.samba.org/pub/rsync/rsync.html "This option changes how rsync transfers a file when its data needs to be updated: instead of the default method of creating a new copy of the file and moving it into place when it is complete, rsync instead writes the updated data directly to the destination file."

 rsync --inplace source destination

Solution 2:

rsync transfers contents to a temporary file, in the target folder, first; if it succeeds it renames that temporary file to become the target file. if the transfer fails, it deletes the temporary file. a 2GB file would have filled up your target space then after rsync deletes it the space is available again. so, rsync can trick your investigation of the space issue.