Can anyone help me understand this? Why is there such a huge
discrepancy in the amount of drive space being used?

I have about 5 million jpg images ( about 100Gig) which I am moving
from a local file system to an nfs share. The files use a lot more
space on the new file system then they do on the old. The both are
ext3 file systems. The block sizes are the same. There are a different
number of Inodes per group and inode blocks per group but I'm not sure
what that means.



95440088 on the old
114727908 on the new

the old is a fedora 2 box with a plain old 250gig ide drive
the new is a centos 5 box with software raid 5 across 3 500 gig sata drives


here are some details:
Old:
[user at old devmlsserver]$ du --max-depth=2 retsPhotoCache/
229488  retsPhotoCache/2/0
553248  retsPhotoCache/2/2
279584  retsPhotoCache/2/1
1230948 retsPhotoCache/2/3
2293272 retsPhotoCache/2
144     retsPhotoCache/9/1
148     retsPhotoCache/9
113028  retsPhotoCache/1/4
74016   retsPhotoCache/1/6
131180  retsPhotoCache/1/5
26292   retsPhotoCache/1/0
109172  retsPhotoCache/1/2
100024  retsPhotoCache/1/1
100264  retsPhotoCache/1/3
653980  retsPhotoCache/1
32      retsPhotoCache/8/7
36      retsPhotoCache/8
30423608        retsPhotoCache/3/4
4432832 retsPhotoCache/3/0
11340184        retsPhotoCache/3/2
28      retsPhotoCache/3/9
5287432 retsPhotoCache/3/1
41008560        retsPhotoCache/3/3
92492648        retsPhotoCache/3
95440088        retsPhotoCache/


New:
[root at new nfsshare]#  du --max-depth=2 retsPhotoCache/
184     retsPhotoCache/9/1
192     retsPhotoCache/9
56      retsPhotoCache/8/7
64      retsPhotoCache/8
147640  retsPhotoCache/1/4
171272  retsPhotoCache/1/5
130884  retsPhotoCache/1/1
34440   retsPhotoCache/1/0
129292  retsPhotoCache/1/3
140840  retsPhotoCache/1/2
94040   retsPhotoCache/1/6
848416  retsPhotoCache/1
44      retsPhotoCache/3/9
35892708        retsPhotoCache/3/4
6851728 retsPhotoCache/3/1
5830840 retsPhotoCache/3/0
48506212        retsPhotoCache/3/3
13833412        retsPhotoCache/3/2
110914952       retsPhotoCache/3
354728  retsPhotoCache/2/1
290028  retsPhotoCache/2/0
1617400 retsPhotoCache/2/3
702112  retsPhotoCache/2/2
2964276 retsPhotoCache/2
114727908       retsPhotoCache/


Can anyone help me understand this? Why is there such a huge
discrepancy in the amount of drive space being used?

I have about 5 million jpg images ( about 100Gig) which I am moving
from a local file system to an nfs share. The files use a lot more
space on the new file system then they do on the old. The both are
ext3 filesystems. The block sizes are the same. There are a different
number of Inodes per group and inode blocks per group but I'm not sure
what that means.



95440088 on the old
114727908 on the new

the old is a fedora 2 box with a plain old 250gig ide drive
the new is a centos 5 box with software raid 5 across 3 500 gig sata drives


here are some details:
Old:
[user at old devmlsserver]$ du --max-depth=2 retsPhotoCache/
229488  retsPhotoCache/2/0
553248  retsPhotoCache/2/2
279584  retsPhotoCache/2/1
1230948 retsPhotoCache/2/3
2293272 retsPhotoCache/2
144     retsPhotoCache/9/1
148     retsPhotoCache/9
113028  retsPhotoCache/1/4
74016   retsPhotoCache/1/6
131180  retsPhotoCache/1/5
26292   retsPhotoCache/1/0
109172  retsPhotoCache/1/2
100024  retsPhotoCache/1/1
100264  retsPhotoCache/1/3
653980  retsPhotoCache/1
32      retsPhotoCache/8/7
36      retsPhotoCache/8
30423608        retsPhotoCache/3/4
4432832 retsPhotoCache/3/0
11340184        retsPhotoCache/3/2
28      retsPhotoCache/3/9
5287432 retsPhotoCache/3/1
41008560        retsPhotoCache/3/3
92492648        retsPhotoCache/3
95440088        retsPhotoCache/


New:
[root at new nfsshare]#  du --max-depth=2 retsPhotoCache/
184     retsPhotoCache/9/1
192     retsPhotoCache/9
56      retsPhotoCache/8/7
64      retsPhotoCache/8
147640  retsPhotoCache/1/4
171272  retsPhotoCache/1/5
130884  retsPhotoCache/1/1
34440   retsPhotoCache/1/0
129292  retsPhotoCache/1/3
140840  retsPhotoCache/1/2
94040   retsPhotoCache/1/6
848416  retsPhotoCache/1
44      retsPhotoCache/3/9
35892708        retsPhotoCache/3/4
6851728 retsPhotoCache/3/1
5830840 retsPhotoCache/3/0
48506212        retsPhotoCache/3/3
13833412        retsPhotoCache/3/2
110914952       retsPhotoCache/3
354728  retsPhotoCache/2/1
290028  retsPhotoCache/2/0
1617400 retsPhotoCache/2/3
702112  retsPhotoCache/2/2
2964276 retsPhotoCache/2
114727908       retsPhotoCache/



here is one small dir structure for comparison
Old Local FS:
[user at old retsphototest]$ du /home/user/user/home/devmlsserver/retsPhotoCache/8
20      /home/user/user/home/devmlsserver/retsPhotoCache/8/7/8/8/2
24      /home/user/user/home/devmlsserver/retsPhotoCache/8/7/8/8
28      /home/user/user/home/devmlsserver/retsPhotoCache/8/7/8
32      /home/user/user/home/devmlsserver/retsPhotoCache/8/7
36      /home/user/user/home/devmlsserver/retsPhotoCache/8

Old nfs shared FS:
[user at old retsphototest]$ du /home/user/retsphototest/8
32      /home/user/retsphototest/8/7/8/8/2
40      /home/user/retsphototest/8/7/8/8
48      /home/user/retsphototest/8/7/8
56      /home/user/retsphototest/8/7
64      /home/user/retsphototest/8

New local FS, this is the share:
[root at new retsPhotoCache]# du /var/nfsshare/retsPhotoCache/8
32      /var/nfsshare/retsPhotoCache/8/7/8/8/2
40      /var/nfsshare/retsPhotoCache/8/7/8/8
48      /var/nfsshare/retsPhotoCache/8/7/8
56      /var/nfsshare/retsPhotoCache/8/7
64      /var/nfsshare/retsPhotoCache/8

Old:
[root at old ~]# dumpe2fs -h /dev/sda2
dumpe2fs 1.36 (05-Feb-2005)
Filesystem volume name:   /1
Last mounted on:          <not available>
Filesystem UUID:          924b8f6c-8f8e-4cb2-a1ef-d513b5c8a437
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index
filetype needs_recovery sparse_super large_file
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              30375936
Block count:              60739756
Reserved block count:     3036987
Free blocks:              42722859
Free inodes:              28747754
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      1009
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         16384
Inode blocks per group:   512
Filesystem created:       Wed Jun 15 15:47:25 2005
Last mount time:          Tue Apr 10 22:31:09 2007
Last write time:          Tue Apr 10 22:31:09 2007
Mount count:              19
Maximum mount count:      -1
Last checked:             Wed Jun 15 15:47:25 2005
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
First orphan inode:       5062661
Default directory hash:   tea
Directory Hash Seed:      0ae3a9f8-13f0-40cc-9065-a27063627473
Journal backup:           inode blocks

New:
[root at new retsPhotoCache]# dumpe2fs -h /dev/md2
dumpe2fs 1.39 (29-May-2006)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          7888256b-7ba3-4b0c-9a37-76e429cdd90c
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index
filetype needs_recovery sparse_super large_file
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              243138560
Block count:              243123584
Reserved block count:     12156179
Free blocks:              233894892
Free inodes:              243093025
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      966
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         32768
Inode blocks per group:   1024
Filesystem created:       Tue Dec  4 19:39:22 2007
Last mount time:          Fri Dec  7 22:21:45 2007
Last write time:          Fri Dec  7 22:21:45 2007
Mount count:              8
Maximum mount count:      -1
Last checked:             Tue Dec  4 19:39:22 2007
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      9e76f41f-4ee3-4137-ad2d-561eaca9daf7
Journal backup:           inode blocks
Journal size:             128M


Old local:
[user at old devmlsserver]$ ls -l
/home/user/user/home/devmlsserver/retsPhotoCache/8/7/8/8/2
total 16
-rw-rw-r--  1 user user 8048 Apr 23  2007 5.0.Photo.jpg
-rw-rw-r--  1 user user 8048 Jun 28 22:50 5.1.Photo.jpg

Old Share:
[user at old devmlsserver]$ ls -l /home/user/retsphototest/8/7/8/8/2
total 24
-rw-rw-r--  1 user user 8048 Apr 23  2007 5.0.Photo.jpg
-rw-rw-r--  1 user user 8048 Jun 28 22:50 5.1.Photo.jpg

[user at old devmlsserver]$ md5sum
/home/user/user/home/devmlsserver/retsPhotoCache/8/7/8/8/2/5.1.Photo.jpg
d238ee668828117193e037a61b62a636
/home/user/user/home/devmlsserver/retsPhotoCache/8/7/8/8/2/5.1.Photo.jpg
[user at old devmlsserver]$ md5sum /home/user/retsphototest/8/7/8/8/2/5.1.Photo.jpg
d238ee668828117193e037a61b62a636
/home/user/retsphototest/8/7/8/8/2/5.1.Photo.jpg

-- 
- Tom Penney