Dear all, I am expieriencing a strange problem when using the secure copy command 'scp'. I use the following command: ~> scp -rp 10.3.10.8:/home/uleopold/ . The directory to copy has a size of 14GB. The starnge things is that it does not stop copying when all files have been transfered but it starts again and hence the directory on the new host grows constantly. Once I ended up with a size of 61GB instead of 14GB. I tried to start scp from both machines and transferred it always to the same machine. I do not know how this can happen. I also tried a smaller single directory. For that on eit worked without any problems. It seems as iff it followed a link and is following this link infinitely. ut I do not have any link in the home directory. Any idea what is happening? Cheers, Ulrich
Dear all,
I am expieriencing a strange problem when using the secure copy command 'scp'. I use the following command:
~> scp -rp 10.3.10.8:/home/uleopold/ .
The directory to copy has a size of 14GB. The starnge things is that it does not stop copying when all files have been transfered but it starts again and hence the directory on the new host grows constantly. Once I ended up with a size of 61GB instead of 14GB.
I tried to start scp from both machines and transferred it always to the same machine. I do not know how this can happen. I also tried a smaller single directory. For that on eit worked without any problems. It seems as iff it followed a link and is following this link infinitely. ut I do not have any link in the home directory. Then only thing I can think of is that /home/uleopold/ or possibly one of its subdirectories on the 10.3.10.8 system has some type of a problem,
On Thursday 01 September 2005 7:42 am, Ulrich Leopold wrote:
possibly a hard or symbolic link to self (other than .).
You might want to use the -v (verbose switch). Also, you might also want to
log into the 10.3.10.8 system, and try using the local cp command:
cp -pr /home/uleopold/ /var/tmp
If cp exhibits the same behavior, I am sure that /home/uleopold tree has
some problems.
Another possibility is to use rsync:
rsync -vaz -e ssh 10.3.10.8:/home/uleopold/ .
The -v flag should give you some additional information.
--
Jerry Feldman
On Thu, September 1, 2005 15:44, Jerry Feldman said:
Dear all,
I am expieriencing a strange problem when using the secure copy command 'scp'. I use the following command:
~> scp -rp 10.3.10.8:/home/uleopold/ .
The directory to copy has a size of 14GB. The starnge things is that it does not stop copying when all files have been transfered but it starts again and hence the directory on the new host grows constantly. Once I ended up with a size of 61GB instead of 14GB.
I tried to start scp from both machines and transferred it always to the same machine. I do not know how this can happen. I also tried a smaller single directory. For that on eit worked without any problems. It seems as iff it followed a link and is following this link infinitely. ut I do not have any link in the home directory. Then only thing I can think of is that /home/uleopold/ or possibly one of its subdirectories on the 10.3.10.8 system has some type of a problem,
On Thursday 01 September 2005 7:42 am, Ulrich Leopold wrote: possibly a hard or symbolic link to self (other than .).
You might want to use the -v (verbose switch). Also, you might also want to log into the 10.3.10.8 system, and try using the local cp command: cp -pr /home/uleopold/ /var/tmp If cp exhibits the same behavior, I am sure that /home/uleopold tree has some problems.
Another possibility is to use rsync: rsync -vaz -e ssh 10.3.10.8:/home/uleopold/ .
The -v flag should give you some additional information.
The following worked: scp -rp 10.3.10.8:/home/uleopold/* laptop/uleopold/ So maybe the /home/uleopold has some kind of hard link?? There are no symbolic links as far as I know. How can I detect hard links? Or how can detect removed hard/symbolic links if this is messing up things. Or are there any other methods to detect the problem? Cheers, Ulrich
On Thursday 01 September 2005 1:01 pm, Ulrich Leopold wrote:
scp -rp 10.3.10.8:/home/uleopold/* laptop/uleopold/
So maybe the /home/uleopold has some kind of hard link?? There are no symbolic links as far as I know. How can I detect hard links? Or how can detect removed hard/symbolic links if this is messing up things. Or are there any other methods to detect the problem?
Symbolic links are easy to spot with ls. Hard links are more difficult for a
couple of reasons.
First, by definition, a hard link is simply another entry in a directory
with the same inode. (Use ls -ali).
INODE LINKS
6411 drwx------ 3 gaf gaf 120 2005-09-01 09:05 Personal
The directory, Personal has 3 hard links:
1. The entry in the parent directory name personal.
2. The entry in the Personal directory itself (the .)
6411 drwx------ 3 gaf gaf 120 2005-09-01 09:05 .
3. A subdirectory always has an entry for its parent, this is the ..
6411 drwx------ 3 gaf gaf 120 2005-09-01 09:05 ..
scp _should_ ignore the . and .. entries. If you have a subdirectory in the
uleopold tree that has the same inode as uleopold that could be causing the
problem. I've seen this thing occur on Linux (rarely) after a crash.
Normally, the system will prevent you from doing this, but it has happened
to me, primarily as a result of a bad power supply. I would possibly
suspect that since 10.3.10.8:/home/uleopold/* worked, that scp might have a
bug in it, which is why I suggested logging in to the 10.3.10.8 system, and
issuing the cp -rp 10.3.10.8:/home/uleopold /var/tmp
--
Jerry Feldman
participants (2)
-
Jerry Feldman
-
Ulrich Leopold