Clone a hard disk using DD from a smaller hard disk to a larger disk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a hard disk of 320GB attached to a debian machine and a new 2TB drive which will be an upgrade for the smaller drive.



I've just tried to clone the smaller drive to the larger drive using the following command:



sudo dd if=/dev/disk5 of=/dev/disk2 bs=4096 conv=sync,noerror


However this has resulted in the 2TB drive showing as 320GB.



When I run (the sda numbers have changed as I did the clone from my mac and then plugged the drive into the debian machine):



sudo fdisk -u /dev/sda1


I get the following output showing that the 2TB drive has shrunk to the smaller drive size.




Disk /dev/sda1: 298.1 GiB, 320071884800 bytes, 625140400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5094580b




How do I expand the drive to show it's full capacity, preferably without having to dd again as it took a very long time?



I've tried:



sudo resize2fs /dev/sda1


But that doesn't do anything. It gives the following output:



The filesystem is already 78142550 (4k) blocks long. Nothing to do!


UPDATE:



If I run:



sudo fdisk -l


I get the following:



Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x54bd406a

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 625142447 625140400 298.1G 83 Linux








share









New contributor




hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I have a hard disk of 320GB attached to a debian machine and a new 2TB drive which will be an upgrade for the smaller drive.



    I've just tried to clone the smaller drive to the larger drive using the following command:



    sudo dd if=/dev/disk5 of=/dev/disk2 bs=4096 conv=sync,noerror


    However this has resulted in the 2TB drive showing as 320GB.



    When I run (the sda numbers have changed as I did the clone from my mac and then plugged the drive into the debian machine):



    sudo fdisk -u /dev/sda1


    I get the following output showing that the 2TB drive has shrunk to the smaller drive size.




    Disk /dev/sda1: 298.1 GiB, 320071884800 bytes, 625140400 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x5094580b




    How do I expand the drive to show it's full capacity, preferably without having to dd again as it took a very long time?



    I've tried:



    sudo resize2fs /dev/sda1


    But that doesn't do anything. It gives the following output:



    The filesystem is already 78142550 (4k) blocks long. Nothing to do!


    UPDATE:



    If I run:



    sudo fdisk -l


    I get the following:



    Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x54bd406a

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 2048 625142447 625140400 298.1G 83 Linux








    share









    New contributor




    hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a hard disk of 320GB attached to a debian machine and a new 2TB drive which will be an upgrade for the smaller drive.



      I've just tried to clone the smaller drive to the larger drive using the following command:



      sudo dd if=/dev/disk5 of=/dev/disk2 bs=4096 conv=sync,noerror


      However this has resulted in the 2TB drive showing as 320GB.



      When I run (the sda numbers have changed as I did the clone from my mac and then plugged the drive into the debian machine):



      sudo fdisk -u /dev/sda1


      I get the following output showing that the 2TB drive has shrunk to the smaller drive size.




      Disk /dev/sda1: 298.1 GiB, 320071884800 bytes, 625140400 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x5094580b




      How do I expand the drive to show it's full capacity, preferably without having to dd again as it took a very long time?



      I've tried:



      sudo resize2fs /dev/sda1


      But that doesn't do anything. It gives the following output:



      The filesystem is already 78142550 (4k) blocks long. Nothing to do!


      UPDATE:



      If I run:



      sudo fdisk -l


      I get the following:



      Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x54bd406a

      Device Boot Start End Sectors Size Id Type
      /dev/sda1 2048 625142447 625140400 298.1G 83 Linux








      share









      New contributor




      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have a hard disk of 320GB attached to a debian machine and a new 2TB drive which will be an upgrade for the smaller drive.



      I've just tried to clone the smaller drive to the larger drive using the following command:



      sudo dd if=/dev/disk5 of=/dev/disk2 bs=4096 conv=sync,noerror


      However this has resulted in the 2TB drive showing as 320GB.



      When I run (the sda numbers have changed as I did the clone from my mac and then plugged the drive into the debian machine):



      sudo fdisk -u /dev/sda1


      I get the following output showing that the 2TB drive has shrunk to the smaller drive size.




      Disk /dev/sda1: 298.1 GiB, 320071884800 bytes, 625140400 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x5094580b




      How do I expand the drive to show it's full capacity, preferably without having to dd again as it took a very long time?



      I've tried:



      sudo resize2fs /dev/sda1


      But that doesn't do anything. It gives the following output:



      The filesystem is already 78142550 (4k) blocks long. Nothing to do!


      UPDATE:



      If I run:



      sudo fdisk -l


      I get the following:



      Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x54bd406a

      Device Boot Start End Sectors Size Id Type
      /dev/sda1 2048 625142447 625140400 298.1G 83 Linux






      debian hard-disk





      share









      New contributor




      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share









      New contributor




      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share








      edited 2 mins ago





















      New contributor




      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 8 mins ago









      hojkoff

      1011




      1011




      New contributor




      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      hojkoff is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          hojkoff is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475177%2fclone-a-hard-disk-using-dd-from-a-smaller-hard-disk-to-a-larger-disk%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          hojkoff is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          hojkoff is a new contributor. Be nice, and check out our Code of Conduct.












          hojkoff is a new contributor. Be nice, and check out our Code of Conduct.











          hojkoff is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475177%2fclone-a-hard-disk-using-dd-from-a-smaller-hard-disk-to-a-larger-disk%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?