Menu

Device-to-device from a small to large hard drive fails, asking if the target drive is too small

Help
2017-06-20
2017-06-20
  • Joey Dumont

    Joey Dumont - 2017-06-20

    CloneZilla version: 2.5.0-25-amd64

    I am having issues when trying to clone my current HDD to a new, larger one. My source hard drive is a 1.0TB hard drive, with an additional 24GB SSD storage that appears as a separate disk in CloneZilla. My target hard drive is a 2.0TB hard drive, with no additional SSD storage.

    I am trying to clone /dev/sdb, the 1TB HDD portion of my current drive, to the new drive /dev/sdc. However, I always get this error:

    Clonezilla log

    I've also had an error saying that the expected size /dev/sdc3 was < 0, but I don't know what paramters I used. I've tried removing the r flag, or adding the -k2 flag, but nothing worked.

    Not sure it if matters, but here are the partitions of /dev/sdb.

    Partitions

     
  • Joey Dumont

    Joey Dumont - 2017-06-26

    I have also tried using device-image mode, but that also fails. The log basically says the same thing as last time, with the added warning that the Last LBA specified by script is out of range.

    What's the problem here exactly? The original drive is a 1TB HDD, and I'm trying to copy to a 2 TB drive. Is the arithmetic in CloneZilla wrong somewhere?

    Should I just create the partition table on my new drive manually and restore partition by partition?

    (Sorry the lousy pictures, it's the best I can do with my current setup.)

    Error log

     

    Last edit: Joey Dumont 2017-06-26
  • Joey Dumont

    Joey Dumont - 2017-06-29

    I'm still not sure what the problem was, but ddrescue was able to copy my data to the new drive without any issue. I wll now use gparted to resize the partitions so as to use the entire drive.

    I imagine there was an issue with rescaling the GPT partitions, although I remember trying something that supposedly disabled parition resizing. Not sure now.

    I'm still interested in knowing what went wrong here, if you have any information to give me.

    Cheers,

     
  • Steven Shiau

    Steven Shiau - 2017-07-05

    Interesting...
    Could you please show us the partition table file i n the image dir, like
    sda-pt.sf
    sda-pt.parted.compact

    Steven

     
  • Joey Dumont

    Joey Dumont - 2017-07-05

    Hmm, you mean I should try to image the drive and show you the sda-pt.sf and sda-pt.parted.compact files contained in the image directory? As of right now I don't have an image of the drive, I used ddescue to directly copy the data of my drive onto the new one.

     

    Last edit: Joey Dumont 2017-07-05
  • Steven Shiau

    Steven Shiau - 2017-07-05

    Oh, you mentioned you also tried "device-image mode", that's why I asked you to provide that.
    Or you can get those file with command:
    sudo parted -s /dev/sdb unit compact print > sdb.parted.compact

    sudo sfdisk -d /dev/sdb > sdb-pt.sf

    Steven

     
  • Joey Dumont

    Joey Dumont - 2017-07-05

    I have taken those from my old hard drive (I didn't have time to figure out how to fix the bootloader and stuff on the new one).

    Here's sdb.parted.compact:

    valandil ~ $ cat sdb.parted.compact 
    Model: ATA ST1000LM024 HN-M (scsi)
    Disk /dev/sdb: 1000GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    Disk Flags: 
    
    Number  Start   End     Size    File system     Name                          Flags
     1      1049kB  1050MB  1049MB  ntfs            Basic data partition          hidden, diag
     2      1050MB  1322MB  273MB   fat32           EFI system partition          boot, esp
     3      1322MB  2371MB  1049MB  fat32           Basic data partition          hidden
     4      2371MB  2505MB  134MB                   Microsoft reserved partition  msftres
     5      2505MB  484GB   482GB   ntfs            Basic data partition          msftdata
     7      484GB   592GB   107GB   ext4            root
     8      592GB   976GB   384GB   ext4            home
     9      976GB   985GB   9160MB  linux-swap(v1)  swap
     6      985GB   1000GB  15.0GB  ntfs            Basic data partition          hidden, diag
    

    And sdb-pt.sf

    valandil ~ $ cat sdb-pt.sf 
    label: gpt
    label-id: 97135F1B-5E17-4086-9294-A29F7B0D6723
    device: /dev/sdb
    unit: sectors
    first-lba: 34
    last-lba: 1953525134
    
    /dev/sdb1 : start=        2048, size=     2048000, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=0C974C25-C03A-4AA2-91A7-339F6B123EA8, name="Basic data partition", attrs="RequiredPartition"
    /dev/sdb2 : start=     2050048, size=      532480, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=4AAE734F-B9C8-4EB1-AB8C-3B59A13CAE6F, name="EFI system partition"
    /dev/sdb3 : start=     2582528, size=     2048000, type=BFBFAFE7-A34F-448A-9A5B-6213EB736C22, uuid=F913734D-48A1-46A7-B038-9A705B9DE19D, name="Basic data partition", attrs="RequiredPartition"
    /dev/sdb4 : start=     4630528, size=      262144, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=188E992C-BCC7-46EA-965C-1DF26710A1A8, name="Microsoft reserved partition"
    /dev/sdb5 : start=     4892672, size=   940978176, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=B17B21C6-9A37-4B03-ABD9-F5F4389A4C87, name="Basic data partition"
    /dev/sdb6 : start=  1924257792, size=    29265920, type=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC, uuid=B3FB33B2-1BF1-404F-B3BD-3F1CE05C9418, name="Basic data partition", attrs="RequiredPartition"
    /dev/sdb7 : start=   945870848, size=   209715200, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=571053CE-1C5F-4BC9-AFB8-F2D1F7E44BA9, name="root"
    /dev/sdb8 : start=  1155586048, size=   750780416, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=746E6DFC-1A38-4693-AE1D-D1FC88E2EB71, name="home"
    /dev/sdb9 : start=  1906366464, size=    17891328, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=0DE45FDB-1C50-4AF0-BFFB-93EEE3145040, name="swap"
    
     
  • Steven Shiau

    Steven Shiau - 2017-07-05

    OK, so this only fails when you enable "-k1" option? If so, definitely the issue is on the program "ocs-expand-gpt-pt" which can not deal with the partition layout you have. You can see that your "sda6" is not in the order so that's why I believe. I suggest you can use the beginner mode to clone that, then use gparted live to tune the partition size in the destination disk.

    Steven

     
  • Joey Dumont

    Joey Dumont - 2017-07-05

    No, the device-device mode failed regardless of the parameters I set. I can try with beginner mode, but I wanted to enable the rescue mode, as there are some bad blocks on my old drive.

    Will report back when I've tried beginner mode.

     
  • Joey Dumont

    Joey Dumont - 2017-07-18

    I have successfully cloned the disk with beginner mode. I first used CloneZilla in beginner mode to copy the entire disk to the new done, then used expert mode (to toggle rescue mode) on the single partition that contained bad sectors. Everything booted up nicely, with nothing whatsoever to be done.

    Cheers,

     
  • Steven Shiau

    Steven Shiau - 2017-07-23

    Great. Thanks for sharing that.

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.