Quote:

Having rsync started within $( ... ) is responsible for forking off a subshell. It might be this subshell that is hanging.

Your drives are mounted read/write when you rsync. Why don't you just redirect the output to a file? This will save an extra process.

I thought the same so ran it without capturing the output at all, i.e. just a direct rsync ..... command and it made no difference.

The reason I capture to a variable is that during the sync root is still ro and this way I only set rw at the end, write the stats to a file and then set the whole lot ro. Just means that if it all goes pearshaped during the sync, at least root should be safe.

It's a small point but, it doesn't make any difference to this problem.