After the copy, there is a directory size mismatch.
Cameron Simpson
cs at zip.com.au
Mon Jun 5 03:34:00 UTC 2006
On 02Jun2006 16:29, unix syzadmin <unixsyzadmin at gmail.com> wrote:
| I am copying from one redhat linux server to another using scp recursive
| copy (scp -r). After the copy, there is a directory size mismatch. Please
| suggest.
|
| Source
| =====
| du -sk *
| 4 all_env.sh
| 16 all_home
| 816 ALSB_2.1
| 628 Certification_Docs
| 6743852 Diamond
| 656952 installed_software
| 28296 jrockit142
| 73548 jrockit-j2re1.4.2_08
| 16 lost+found
| 780 wls90_certification_docs
|
| Destination
| ========
| du -sk *
| 4 all_env.sh
| 8 all_home
| 772 ALSB_2.1
| 572 Certification_Docs
| 6709356 Diamond
| 652824 installed_software
| 28288 jrockit142
| 71364 jrockit-j2re1.4.2_08
| 4 lost+found
| 688 wls90_certification_docs
|
| Note: The source is RHEL AS 4 Update1, the destination is a RHEL AS 3
| (Taroon).
There can be small discrepancies due to directory usage.
An active directory (which is a special type of file with name/inode
information in it, underneath) will acquire gaps in its data (eg
suppose you remove a file - it is more efficient to leave an "empty"
slot in the directory file data than to rewrite the whole directory).
So the physical sized of the directories themselves may differ even
though they contain the same filenames; the new directory from your copy
will often be smaller because is has only ever had stuff added to it,
and so probably has the most compact internal data structure.
It is also possible, though unlikely, that there were "sparse" files in
your original directory; they may not be sparse in the new copy.
Try checking for differences using "diff -r" or "rsync -rn".
If they think things are the same you should be ok.
You can check this directly, too. Choose a large and busy directory from
your original and check is size:
ls -ld path-to-directory
Repeat for the corresponding directory in the copy.
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
But pessimism IS realism! - D.L.Bahr
More information about the redhat-list
mailing list