[KLUG Members] Is tar broken?

members@kalamazoolinux.org members@kalamazoolinux.org
Thu, 8 Aug 2002 10:14:42 -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 dmesg have any "server not responding messages"?  What are your nfs mount
options?  Kernel versions?  Did you adjust fs.file-max?  Any TCP parameters? 
Could you Ctrl-C to get out of cp?  How many worker threads do you have
configured on the nfs client and server?

>Then I tried:
>>cd /work
>>tar -cvf - home | tar -xvf - -C /
>and it completed. BUT, then I did

Yes, tar performs I/O in blocks and is thus faster and more efficient,  any may
work over lousy network connections where cp seems to fail.

>>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

Can you table both of them?  Are the sizes different?  Perhaps one is (or
contains) a sparse file.

>Is there something wrong with what I did????

Dont know, yet. :)

>How could this happen???

I could say "Bad things happen to good people",  but that would imply the
existance of "good people".  So I'll say "Bad things happen,  and frequently
effect people regardless of the quality of thier moral fiber."