I have a CentOS system I'm tying to duplicate. I can't use dd
or cat
over SSH from the source server so I have to initiate the command from the target server.
My first choice is to duplicate each partition individually using dd then restore those partitions to a test box once it's already formatted and set up with CentOS.
When I created the new partitions on the target server using the partition tool that comes with CentOS's installer, the partition for /home gets moved to /dev/hda2 by default. The original server has it on /dev/sda3. I tried deleting the partition and recreating it so it will match the original server, but no dice. Each time it gets created on the target server the part editor keeps "promoting" it to /dev/hda2. Both servers are using SATA disks but the original server labels its disc /dev/sda and the target server is /dev/hda. I'm not really concerned about this being a problem, I'm just curious as to why it's doing this since I am explicitly telling the partition tool how to create the partitions.
Does anyone have an explanation for why this is happening? Again, I'm just curious.
For reference, here are the partition tables: Original server:
- /dev/sda2 / 97 GB
- /dev/sda1 /boot 100 MB
- /dev/sda3 /home 352 GB
Target server:
- /dev/hda1 /boot 100 MB
- /dev/hda2 /home 352 GB
- /dev/hda3 / 97 GB
Swap is 2 GB on each device.
gdisk
, please. – mikeserv Apr 14 '14 at 02:57cat
, notdd
. – Gilles 'SO- stop being evil' Apr 14 '14 at 22:14fdisk
. Learning to use either will help to ensure that youre doing it correctly. – mikeserv Apr 15 '14 at 00:19fdisk.
though if youre repartioning the disk, nows the time to go GPT. Also, disks partitioned withgdisk
also have MBRs – mikeserv Apr 15 '14 at 01:20dd
: in your example this is just a complex, error-prone way of writingssh root@newserver 'cat >/dev/sda' </dev/sda
). – Gilles 'SO- stop being evil' Apr 15 '14 at 17:48udev
rules to specify aliases or disk labels or UUIDs as appropriate. I do not think this is the problem you think it is. – mikeserv Apr 16 '14 at 14:02gdisk
please. – mikeserv Apr 17 '14 at 04:47