[KLUG Members] Is tar broken?

Bruce Smith members@kalamazoolinux.org
08 Aug 2002 09:57:38 -0400


> I am adding a second server and I wanted to move the /home directory to
> the new server. I nfs mounted the /home of server1 under /work/home of
> server2. It is a 22G partition.
> 
> I initially tried:
> 
> > cd /work
> > cp -R home /
> 
> but this seemed to hang half-way through.

Did you try "cp -a"?

Any errors in any log files or dmesg for why it hung?

Was the directory still available from NFS after the hang?

You might want to try a different block size on the NFS mount.

> Then I tried:
> 
> > cd /work
> > tar -cvf - home | tar -xvf - -C /
> 
> and it completed. BUT, then I did
> 
> > cd /work
> > diff -r home /home > /tmp/list
> 
> and within /tmp/list I got a few lines that looked like this:
> 
> Binary files home/user1/file.tar and /home/user1/file.tar differ

Any chance a process on one of the two systems has the file(s) open?
Did you double check that with fuser?

> Is there something wrong with what I did????
> How could this happen???

What version of tar are you running?  This is a long shot, but there was
a bug in old versions tar under certain conditions, which usually had to
do with symbolic links . . .

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------