It is currently Sat, 26 Nov 2022 05:13:37 GMT

Author Message
 Size difference when copying LARGE file

Are you copying a live file, or something in use by the database?
What does ls -l show for file size for original and copy?

 Thu, 20 Nov 2008 08:27:33 GMT   
 Size difference when copying LARGE file
In article <>,

What does "ls -ls" show for the original and the copy?

Database files are frequently sparse, they have holes that have
never been written to and don't occupy actual disk space.  Eg:
        % dd if=/dev/zero of=t1 bs=1k count=1 seek=10k
        % cp t1 t2
        % ls -ls t1 t2
          40 -rw-r--r--   1 jgp      10486784 Jun  5 17:17 t1
        10256 -rw-r--r--   1 jgp      10486784 Jun  5 17:18 t2
        % du -s t1 t2
        40      t1
        10256   t2
t1 is only 40k on disk even though the final byte is at lseek
position 10486784.  One copied it grows to 10M since the holes
get filled in.

I believe ufsdump/ufsrestore are the only tools standard tools that
preserve holes in files.

Star ( ) handles them.
Jim Prescott - Computing and Networking Group
School of Engineering and Applied Sciences, University of Rochester, NY

 Sat, 22 Nov 2008 05:24:01 GMT   
 Size difference when copying LARGE file
In article <e627dh$>,

If you use a pre S-2.6 or a recent Solaris, star is able to correctly copy
holes too. With star there is no need to be root in order to do this (at least
not on a recent Solaris version - the old Solaris hole interface forces you to
be root too).

-- (home) J?rg Schilling D-13353 Berlin                (uni)       (work) Blog:

 Sat, 22 Nov 2008 06:01:12 GMT   
   [ 3 post ] 

Similar Threads

1. Size difference when copying a large file in solaris

2. File size wrong, can't copy large file

3. Why the difference in block size after copy?

4. File size difference when nulling a file

5. Enable Large File Size in Aix file system

6. Difference between copy to and copy from nfs mounted disk

7. copy file too large

8. lpr: : copy file is too large ?

9. When I copy large files, I met IO ERROR

10. Please help--WindowsXP cannot copy large files to Samba

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software