A while back someone posted a patch for scp that updates it to deal with files > 2gb by using 64 bit offsets as defined by LFS (Large File Sumit). I belive the patch was tested on Linux but maybe not on other systems that support largefiles. I've tried this under Solaris and scp fails with a broken pipe on only the second write to the pipe between scp and ssh if the file is over 2gb. If the file is under 2gb it works fine. it fails the second time around the for loop that looks like this in scp.c:source() for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { amt = bp->cnt; if (i + amt > stb.st_size) amt = stb.st_size - i; if (!haderr) { SIGPIPE =====>>> result = atomicio(read, fd, bp->buf, amt); .... } scp from: OpenSSH 2.5.1p2 client and server both Solaris. Any comments ? -- Darren J Moffat
Darren Moffat wrote:> > A while back someone posted a patch for scp that updates it to deal with > files > 2gb by using 64 bit offsets as defined by LFS (Large File Sumit). > > I belive the patch was tested on Linux but maybe not on other systems > that support largefiles. > > I've tried this under Solaris and scp fails with a broken pipe on only the > second write to the pipe between scp and ssh if the file is over 2gb. > If the file is under 2gb it works fine. > scp from: OpenSSH 2.5.1p2 > > client and server both Solaris. > Any comments ?I am running OpenSSH on Solaris 2.6 and I can copy large files from Sol2.6 -> Sol2.6 using OpenSSH 2.5.1p2 and 2.3.0p1. I did get a sigpipe when my filesystem wasn't created and mounted with largefiles enabled. I use Veritas, so after I make the fs, I mount it and use fsadm to turn on largefiles support. After that, everything worked like a charm. -- Theo Schlossnagle 1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F 2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
Theo E. Schlossnagle wrote:>> I've tried this under Solaris and scp fails with a broken pipe on only the >> second write to the pipe between scp and ssh if the file is over 2gb.Theo>filesystem wasn't created and mounted with largefiles enabled. That wasn't it. I found the problem, I hadn't copied the scp program with the patch applied to the remote machine, doh! So I can now confirm that the patch does indeed work just fine on Solaris. -- Darren J Moffat