LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-10-2012, 06:06 PM   #1
ppmoore
LQ Newbie
 
Registered: Sep 2006
Posts: 25

Rep: Reputation: 0
Lacie-D2 NAS: Trying to use dd to duplicate hard disk


Hello,

I've been trying to copy the contents of the NAS's hard disk (1TB) ta a new larger disk (2TB).

The disk consists of a extended partition sda1 (consisting of partitions sda5 to sda10) which seems to contain the linux partitions, swap partition and other stuff, and a primary partition sda2 which contains the windows shares.

My first attempt was to use clonezilla to duplicate the disk contents onto the new drive. This worked, except that the recognized size of the new disk was the same as the old. I then tried to use gparted to extend the partition size of the user partition sda2. This failed, and I was no longer able to access the new disk.

Here's the output from fdisk for the old disk:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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
Disk identifier: 0x1ab2618c

Device Boot Start End Blocks Id System
/dev/sda1 63 4016249 2008093+ 5 Extended
/dev/sda2 4016250 1953520064 974751907+ 83 Linux
/dev/sda5 126 514079 256977 82 Linux swap / Solaris
/dev/sda6 514143 530144 8001 83 Linux
/dev/sda7 530208 546209 8001 83 Linux
/dev/sda8 546273 2249099 851413+ 83 Linux
/dev/sda9 2249163 4000184 875511 83 Linux
/dev/sda10 4000248 4016249 8001 83 Linux

When I use fdisk to create the two matching partitions of the new disk, I get the following:
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal I/O) size boundary is recommended, or performance may be impacted.

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x1ab2618c

Device Boot Start End Blocks Id System
/dev/sdb1 2048 4196351 2097152 5 Extended
/dev/sdb2 4196352 3907029167 1951416408 83 Linux

It seems that the the mismatch is because the new disk has a larger sector size.

Can someone help me to duplicate the disk?
Many thanks.

Last edited by ppmoore; 11-10-2012 at 06:07 PM.
 
Old 11-10-2012, 07:12 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
be extra cautious you are writing over the correct disk:
Code:
dd if=/dev/sdx of=/dev/sdy bs=8192
then use something like gparted-live to inflate the disk.
 
Old 11-16-2012, 12:39 AM   #3
ppmoore
LQ Newbie
 
Registered: Sep 2006
Posts: 25

Original Poster
Rep: Reputation: 0
Schneidz, thanks for the reply.

The dd command you posted more or less duplicates what clonezilla does, and didn't work.
It seems that there are two problems:
  • gparted can' move/resize XFS-formatted partitions
  • the new disk uses 4096B sectors, the old disk use 512B sectors, so the partitions on the new disk have to be realigned
Now that I've discovered this, I've posted a new thread to this forum, that more accurately discribes what I'm trying to do.
 
  


Reply

Tags
duplicate, fdisk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't mount Lacie NAS pbhill Linux - Networking 1 12-02-2011 09:22 AM
[SOLVED] LaCie Nas Format CloudBuilder Linux - Software 0 10-05-2010 03:35 PM
[SOLVED] Authentication problems on trying to connect to share on NAS (LaCie d2) axarqi Linux - Networking 2 04-19-2010 04:26 PM
trying to make hard disk duplicate shreedhar.bh Linux - Newbie 6 03-25-2009 02:48 PM
duplicate my hard disk alaios Linux - Hardware 2 04-10-2005 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration