Email: bknpk@hotmail.com Phone: +972-54-7649119

Hard disk clone using dd comand from cygwin.



  1. This page shows the results of disk clone using dd. The clone procedure was explained in the following page.
    A clone of a C partition of windows XP is done in three different ways:

    1. Use gzip as a mean of compression.
    2. Use bzip2 as a mean of compression.
    3. Use bzip2 as a mean of compression plus zero the unused free space on disk.

  2. The experiment is done on a windows XP using cygwin. The target computer hard disk has two partitions namely c and d.
    The system disk size is 36G byte and 31G byte are used.
    The system partition c is cloned and saved into d.
    The system partition is seen by cygwin as /dev/sda1.
    A command example is shown below:

  3. dd if=/dev/sda1 | bzip -c > /cygdrive/d/bp_bz.img.bz

  4. The result of gzip is not good. After 9 hours of work, gzip did not do a great job using XP system files. It created a file of 36519460864 bytes.
    The result of bzip2 is not too good as well. After 9 hours of copy and compress, it stops, because disk d was full. It created a file of size 36519411712 bytes.


  5. Actually I expect better results, if I alter the data of the unused space on the disk.
    When a file is deleted, a table is updated by the operating system, but most of the file content stays on disk, till something else is written on top of that location. So, it is reasonable to assume, that the entire disk contains random data, which is not easy to compress, using gzip or bzip2.
    To help the compress program do its job better, I'll overwrite some of the free space on disk with zeros.

    Using dd again, I'll create the required file. First I run the df command on the drive and received, that total disk c size is 37053888 kilo byte. The free space size is reported to be 5123388 kilo bytes. Again, assuming most of it is random, I expect a maximum of 5G byte improvement at most.

  6. I use dd to create a file of all zero in the size of 4G byte and than remove it.
    dd if=/dev/zero of=TryDisk count=4194304 bs=1024;ls -l TryDisk;\rm -f TryDisk

    4194304+0 records in
    4194304+0 records out
    4294967296 bytes (4.3 GB) copied, 132.921 s, 32.3 MB/s
    -rw-r--r-- 1 krengelp Domain Users 4294967296 Feb 7 15:51 TryDisk

    Once I created the zero file and did the backup again, using bzip2 as the compress program, I got:


    35663488000 bytes. Amazingly not much better.
    Summary of results:

    gzip ............. 36519460864 bytes
    bzip2 ............ 36519411712 bytes
    bzip2 + 4G zero .. 35663488000 bytes

V

 


Home

Installation, configuration and operation of nxserever and nxclient on two debian machines.






Search This Site


Feedback This Site




new pages on this site