LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   scp from ext2 to ext3 (https://www.linuxquestions.org/questions/linux-newbie-8/scp-from-ext2-to-ext3-393163/)

xpucto 12-15-2005 09:51 AM

scp from ext2 to ext3
 
Hi!

I made a backup with scp from an ext2 to an ext3. In the ext2 the whole data is 391MB but in the ext3 (a usb external hard drive) it is 497MB!
Did something go wrong or is it related to the different fileīs system?

Thanks.

XpucTo

druuna 12-15-2005 10:29 AM

Hi,

This could be explained by a different blocksize for ext2 and ext3 (ext3 having a bigger blocksize). It's not something to worry about, it works as designed. Due to the bigger blocksize the ext3 fs uses more space, this will especially show if a lot of small files are stored.

Hope this clears things up a bit.

xpucto 12-15-2005 10:41 AM

Thanks for your answer.

Itī s a bit of a problem because it makes huge difference of space use! For bigger Backups (gigas) how are you then supposed to plan things?

xpucto 12-15-2005 11:17 AM

Something must be wrong actually.

When I do du -h in another directory with ext2, I get 760K. When I do du -h in the same backuped (scp -r) directory in ext3 on an external usb hard drive, I get 120M!

Can anyone explain it to me?

xpucto 12-15-2005 11:21 AM

Ok. Hier it is:
When I do
du -h /home/user/public_html/rpad/R/
I get 104 MB.
When I do
du -h /home/user/public_html/rpad/
I only get 624K

Why?

druuna 12-15-2005 11:59 AM

Hi again,

The R directory (home/user/public_html/rpad/R/) is probably a mounted partition.

Could you post the output of this command:

du -sh /home/user/public_html/rpad/*

and

df -h

About the blocksize difference:

'Normally' the blocksize difference doesn't have that big an effect on the total size. On most modern HD's the blocksize is 4K and most files are bigger then that, so most blocks are 100% used/filled. But if you have a lot(!) of small files (say 1k) the effect will be noticable (every 1k file takes up 4k space [1 block]).


All times are GMT -5. The time now is 02:54 AM.