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

Re: When is a tar file not a tarfile?



> >> I have a compressed tar file, and I unpack it in one place....
> >>
> >>  tar xzf thisfile.tgz
> >>
> >> and then I see how much spave it took up. Let's say it took a
> >> total of 3.8 MB. Then, I copy this to another linux machine, and
> >> issue the SAME command. Now, the result takes up about 6.5 MB!
> >> How can this be?!?
> >
> >It contains a lot of small files and you unpacked it on two
> >different filesystems which have different block sizes?
>
> Interesting that you ask this question; I see no way to READ a filesystem
> blocksize. As a generalization, we're talking about filesystems along
> about the same size, with more than a 2:1 increase in reported space. I
> don't think there are that many "small" files in archive, but once tghe
> blocksizes are known, it's not hard to check this out.

The program "dumpe2fs" will tell you the block size.  
(you may need to load "e2fsprogs-*.rpm" from your stock Redhat CD)

When you mke2fs, the block size defaults larger on larger file 
systems and smaller on small size FS's, so this is very common.  
I see it quite often when I copy my system from one partition to 
another of a different size.

When space is a premium, I mke2fs forcing the block size to 1024,
the smallest, to maximize usage (losing performance in the trade).

One other idea is "sparce files", but I have no idea if they are
supported by Linux and/or ext2.  I've only heard reference to them
in commercial Unix systems.  (my money is on the block sizes)

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------