Thanks for the help James. I thought it might be the case - just being paranoid regarding file sizes.
I've also tarred up the source. (Had to provide the directory name as the second parameter to tar.) Thanks... Mike Michael S. E. Kraus Technical Support Specialist Wild Technology Pty Ltd [EMAIL PROTECTED] Direct Line 02-8306-0007 ________________________________ ABN 98 091 470 692 Level 4 Tiara, 306/9 Crystal Street, Waterloo NSW 2017, Australia Telephone 1300-13-9453 | Facsimile 1300-88-9453 http://www.wildtechnology.net The information contained in this email message and any attachments may be confidential information and may also be the subject of client legal - legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. This email and any attachments are also subject to copyright. No part of them may be reproduced, adapted or transmitted without the written permission of the copyright owner. If you have received this email in error, please immediately advise the sender by return email and delete the message from your system. -----Original Message----- From: James Gray [mailto:[EMAIL PROTECTED] Sent: Thursday, 1 July 2004 12:46 PM To: [EMAIL PROTECTED] Cc: Michael Kraus Subject: Re: [SLUG] Difference between vfat and ext3 filesizes. Michael Kraus wrote: > G'day all.. > > > I've a Win95 HD (from another machine) that I'm wanting to back up, > and I've placed it into a Linux box. > > Now, when I mount the vfat filesystem and copy it to a directory on > the > ext3 filesystem (using `cp -a <src> <dest>`) all seems to go well. > > However - `du -h <vfat partition>` reports 3.1G being used whilst `du > -h > <ext3 copy directory>` reports that there is 3.0G being used. > > Did something fail to copy or is this difference due to filesystem > differences? > > Thanks... > > Mike Hi Mike, First of all, you're more likely to make friends if you don't post to this list in anything other than plain text. HTML and MS-RTF formatted e-mail is a no-no :) Ta. Now as for your question about ext3 versus vfat (or FAT32), I think what you are seeing is simply the result of different block sizes on the two file systems. FAT32 usually has around 4kb/block whereas ext3 usually has 512bytes/block (ie, 0.5kb). This is significant, because only ONE file can occupy a single block so if you have a lot of small files on FAT32, each one will occupy at least 4kb, even if it's 1byte long. The same 1byte file on ext3 will only occupy 512bytes, a saving of about 75% :) Even if your files are bigger than 4kb, unless they fit exactly into 4kb boundaries, you get wastage. Consider a file 8193bytes long, that's 2x4kb blocks, plus 1 byte....that one byte has to occupy a single block. So your 8kb+1 file actually takes up 12kb. The same file on ext3 (512byte blocks) would be 17 blocks = 8.5kb :) See how it works? The bigger the files, the less the block size is a problem, but on 3Gb, 100Mb difference wouldn't be uncommon. If you're still concerned, use "tar" instead of "cp" and turn the verify option on. Something like this is a good start: cd <source> ; tar -cvfW <dest>/backup.tar Then if you want to extract the backup at the destination: cd <dest> ; tar -xvfW backup.tar NOTE: you can't use "verify" (-W) option with tar when using STDIN/STDOUT - you have to be working with a tar file. In other words, you can't do it in one step like this: cd <dest> ; tar -cW <source> | tar -xW ### NO! NO! THIS WONT WORK!! ## Hope all this make sense :) Cheers, James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
