Clone a hard disk using DD from a smaller hard disk to a larger disk
Clash 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
debian hard-disk
New contributor
add a comment |Â
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
debian hard-disk
New contributor
add a comment |Â
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
debian hard-disk
New contributor
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
debian hard-disk
New contributor
New contributor
edited 2 mins ago
New contributor
asked 8 mins ago
hojkoff
1011
1011
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password