[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ext2 fs issues when copying between disks



frodo@morgul.net (Noah L. Meyerhans) wrote:
>I just moved /usr/ to a new partition.  Everything went smoothly, and the
>new /usr is mounted.  However, disk usage is dramatically higher on the
>new /usr than on the old one.  I have confirmed (using 'find . -xtype f
>- -exec cmp {} /mnt/tmp/{} \;') that the directory structures are identical
>between the two filesystems.  However, the files on the new filesystem are
>bigger.  Here's what I mean:

[...]

>I suspect this problem has something to do with 'sparse files'.

Right idea, though not the usual terminology so documentation searches
might have failed you (that reminded me of sparse superblocks or perhaps
files containing "holes", both of which are entirely different; that's
probably just me free-associating again, though). The block size on your
new /usr is larger than that on your old /usr, that's all. Use
'/sbin/tune2fs -l /dev/sda10' and '/sbin/tune2fs -l /dev/sda11' to see
the various parameters of the two filesystems. (Make sure to unmount the
filesystem or remount it read-only before changing any filesystem
parameters with tune2fs, though.)

>What can I do to fix it?

You'll need to recreate it (using mke2fs) with more precise options. The
man page has plenty of details. I'm afraid it's not possible, as far as
I know, to change parameters like the block size of an already-existing
filesystem, but you still seem to have the old one around anyway so it
shouldn't be too much of a problem.

-- 
Colin Watson                                           [cjw44@cam.ac.uk]


Reply to: