Clonezilla question.

Discussion in '*nix Software' started by yugpatel, Dec 24, 2012.

  1. yugpatel

    yugpatel Senior member

    Joined:
    Feb 28, 2001
    Messages:
    505
    Likes Received:
    0
    I recently purchased Intel series 330 180GB SSD and trying to copy Ubuntu from the existing 100GB IDE Maxtor drive.

    Source Drive: Maxtor 100 GB
    Partition1 74.5GB (63.78 used, 10.72 GB free)
    Partition2 20GB Unallocated (used to be linux swap).

    Destination Drive: Intel 180GB
    Partition1 126.95 GB (116.23 GB used, 10.72 GB free)
    Partition2 1.56 Unallocated
    Partition3 14.65 GB Linux swap
    Partition4 26.08 NTFS common access area.

    When try to copy partition1 from source drive to the partition1 of the target, even though source partition is only 63.78GB used in size, the destination partition becomes 116.23 GB (source drive is only 100GB). I don't understand this.

    Is there any way I can mirror partition1 of the source drive without this side effect. I used different option in Clonezilla but no avail.

    PS:- Somehow anandtech does not allow me attachments.
     
  2. Loading...

    Similar Threads - Clonezilla question Forum Date
    Cron scheduling question *nix Software Dec 8, 2016
    A question about Clonezilla *nix Software Jan 29, 2015
    Do I need to "generalize" too when Clonezillaing a Ubuntu installation? *nix Software Nov 14, 2014
    Any free alternatives to Clonezilla? For windows system images. *nix Software Sep 14, 2014
    Clonezilla driver help *nix Software Jun 24, 2009

  3. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    45,797
    Likes Received:
    334
    If I had to guess, I'd say it's taking the physical room of source 1,, and applying it to destination 1. IOW, the data spans 116.23gb, but has holes in it that could be filled. I don't know how you'd do it, but look into compacting source 1 before copying it.
     
  4. AnonymouseUser

    AnonymouseUser Diamond Member

    Joined:
    May 14, 2003
    Messages:
    9,654
    Likes Received:
    62
    I'm thinking a sector size mismatch is at the root of the issue (512 vs 4096). I would suggest not doing partition-to-partition, only drive-to-drive in this case. After the transfer is complete, you can then delete the 2nd partition and repartition the remaining space as you wish.

    If you still wish to do a partition copy instead, try creating an image first, then restoring from that image.
     
  5. mv2devnull

    mv2devnull Senior member

    Joined:
    Apr 13, 2010
    Messages:
    980
    Likes Received:
    3
    Lets assume that each file contains n*4kiB+1 bytes. In 512B blocks that consumes n*4kiB+512B, in 4kiB blocks that consumes n*4kiB+4kiB. The extra space is thus 3.5kiB per file. You would need millions of files to explain the 50GiB+ difference.

    Since the odd partition has Linux filesystem, I would use 'stat' and 'du' to inspect both the original and the copy. I could use 'rsync' to file-copy content of that partition (look at '-H' option for hardlink copy) and fix the fstab by hand.
     
  6. yugpatel

    yugpatel Senior member

    Joined:
    Feb 28, 2001
    Messages:
    505
    Likes Received:
    0
    Thanks for your technical insight. How would I accomplish using step-by-step command?
    I am not so expert, would you please guide me? If sector size is issue, how would I control it while copying?

    I will try that also.

    More over, I used dd command as explained at http://www.cyberciti.biz/faq/howto-copy-mbr/ but some result.
     
  7. AnonymouseUser

    AnonymouseUser Diamond Member

    Joined:
    May 14, 2003
    Messages:
    9,654
    Likes Received:
    62
    I agree with your assessment, I just couldn't figure out how the file system grew so much otherwise.
     
  8. yugpatel

    yugpatel Senior member

    Joined:
    Feb 28, 2001
    Messages:
    505
    Likes Received:
    0
    Tried using Acronis True Image and used clone disk option and it copied the 80GB parttiion correctly (sector by sector)(69.xx GB used 10.xx free) but it did not copy MBR and hence I cannot boot from SSD. How can I copy MBR?

    I tried creating 2MB partiton at beginning of the SSD, use acronis to clone 80GB partition and then copy MBR using the command:
    # dd if=/dev/sda of=/tmp/mbrsda.bak bs=512 count=1
    dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1

    Then tried to boot from SSD, no go.

    After all these, I went back to clonezilla, but used disk to disk cloning this time and everything worked out fine, the destination drive NOW has 80GB partiton with 10.xx GB free. Next, I tried to resize the partition to 130GB using GParted, and now the partiton is 116.xxGB used and 10xxGB free.

    Any suggestion. ( I believe during resizing, I can specify secror size to be 512 insted of 4096, correct?)
     
  9. AnonymouseUser

    AnonymouseUser Diamond Member

    Joined:
    May 14, 2003
    Messages:
    9,654
    Likes Received:
    62
    Glad to see that worked, though I am surprised Acronis TI didn't work.

    That is how a 130GB partition should look, technically speaking.

    116.xxGB + 10.xxGB = 126.xxGB

    1GB = 1024MB

    130GB / 1024MB = 126953MB or 126.953GB

    You don't need to do that, and if you do the drive performance will suffer. Modern drives are designed for the 4096-byte sector size (aka, Advanced Format).
     
  10. yugpatel

    yugpatel Senior member

    Joined:
    Feb 28, 2001
    Messages:
    505
    Likes Received:
    0
    Currently, 180GB SSD has partition size of 74.5 (63.79GB used, 10.71GB free), 93.17GB free.
    The thing I don't understand is, when I resize this partition from 74.5GB to 130GB, why does used space increase from 63.79GB to 116.XX GB and free space remains as is, 10.71GB?
     
  11. AnonymouseUser

    AnonymouseUser Diamond Member

    Joined:
    May 14, 2003
    Messages:
    9,654
    Likes Received:
    62
    That I don't know. Can you plug the SSD into another PC? If so, does it report the correct usage? How old is the PC you are currently using? Is AHCI enabled in the BIOS?