Re: File size discrepancies

2007-10-01 Thread Modulok
Thanks for all the great feedback, guys. It helped.

-Modulok-

On 9/29/07, Lowell Gilbert [EMAIL PROTECTED] wrote:
 Modulok [EMAIL PROTECTED] writes:

  So, the size of a directory itself can differ when the contents is
  identical? This is news to me.

 If you delete files from a directory, the storage used for the
 directory entries is not freed.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-29 Thread Modulok
 du doesn't count in bytes; it counts in disk blocks or KB.  A 12KB
 difference is probably just due to better packing of directories in
 your newly-created tree as compared to your orignal one.  To figure out
 where the difference is, run du -a in both trees and diff the two
 outputs.

What I did to try and track down the problem:

du -a ./dirA | sort -n  dirA.tmp;
du -a ./dirB | sort -n  dirB.tmp;
diff dirA.tmp dirB.tmp;

# Exerp of the diff output:
 554372./images
 554362./images

 17007468 ./video
  17007466 ./video

The size discrepancy is the size of the directories, not the files
contained within those directories. To be sure I ran:

diff -r dirA/images dirB/images;

There appears to be no difference in the contents.

du doesn't count in bytes; it counts in disk blocks or KB.  A 12KB
difference is probably just due to better packing of directories in
your newly-created tree as compared to your orignal one.

So, the size of a directory itself can differ when the contents is
identical? This is news to me.

Thanks.
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-29 Thread Lowell Gilbert
Modulok [EMAIL PROTECTED] writes:

 So, the size of a directory itself can differ when the contents is
 identical? This is news to me.

If you delete files from a directory, the storage used for the
directory entries is not freed.  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


File size discrepancies

2007-09-28 Thread Modulok
I have a file hierarchy of about 18GiB which was copied from a UFS 2
file system one hard disk to a UFS 2 file system on a gmirror array.
The size of the two hierarchies differ by 12 bytes according to du(1).
No errors were reported by cp(1) during the copy operation.

Is this normal, or should I start hunting for corruption?

FreeBSD 6.1-RELEASE
-Modulok-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-28 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Modulok wrote:
 I have a file hierarchy of about 18GiB which was copied from a UFS 2
 file system one hard disk to a UFS 2 file system on a gmirror array.
 The size of the two hierarchies differ by 12 bytes according to du(1).
 No errors were reported by cp(1) during the copy operation.
 
 Is this normal, or should I start hunting for corruption?

Hmmm... 12 bytes out of 18GiB is pretty good going.  A 12 byte
discrepancy could be due to something as simple as a changed path
name in a sym-link or two.  Most other reasonable explanations for a
size difference I can think of would probably result in a bigger
discrepancy.

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/UrG8Mjk52CukIwRCC8yAJwJfgq5bRiUxL0FmTJx0KRTSEl4iQCfR0LD
kgdxWwDRQCoGeCTOS0ANDGk=
=7DnR
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-28 Thread Chuck Swiger

On Sep 28, 2007, at 11:27 AM, Modulok wrote:

I have a file hierarchy of about 18GiB which was copied from a UFS 2
file system one hard disk to a UFS 2 file system on a gmirror array.
The size of the two hierarchies differ by 12 bytes according to du(1).
No errors were reported by cp(1) during the copy operation.


cp may copy through symlinks-- it's not the ideal tool for  
replicating very large hierarchies if they contain links.  tar,  
rsync, dump/restore might be better choices, and you could use rsync - 
acv to check for and correct any differences.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-28 Thread Lowell Gilbert
Modulok [EMAIL PROTECTED] writes:

 I have a file hierarchy of about 18GiB which was copied from a UFS 2
 file system one hard disk to a UFS 2 file system on a gmirror array.
 The size of the two hierarchies differ by 12 bytes according to du(1).
 No errors were reported by cp(1) during the copy operation.

 Is this normal, or should I start hunting for corruption?

The explanation is probably benign, but checking is very simple; just
build an mtree(8) description on the original hierarchy and check it
against the second one.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: File size discrepancies

2007-09-28 Thread Dan Nelson
In the last episode (Sep 28), Modulok said:
 I have a file hierarchy of about 18GiB which was copied from a UFS 2
 file system one hard disk to a UFS 2 file system on a gmirror array.
 The size of the two hierarchies differ by 12 bytes according to du(1).
 No errors were reported by cp(1) during the copy operation.

du doesn't count in bytes; it counts in disk blocks or KB.  A 12KB
difference is probably just due to better packing of directories in
your newly-created tree as compared to your orignal one.  To figure out
where the difference is, run du -a in both trees and diff the two
outputs.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]