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.

  • use gdisk, please. – mikeserv Apr 14 '14 at 2:57
  • 1
    @mikeserv Why do you think that the new server uses GPT partitioning? – Gilles Apr 14 '14 at 22:12
  • 2
    I don't understand why the partition number is a problem, nor what software you're doing this partition creating is. Nor why the corporate firewall has anything to do with duplicating partitions vs duplicating the whole disk. And by the way, use cat, not dd. – Gilles Apr 14 '14 at 22:14
  • 1
    @Tensigh unix.stackexchange.com/questions/121865/… – Gilles Apr 16 '14 at 1:58
  • 2
    If you have doubts about an internet stranger's recommendation, experiment. Also - you should not get so hung up on which kernel name udev chooses for your disks, especially if you are not explicitly specifying the partition order yourself and instead rely on the behavior of an automated tool to do so for you - which can easily vary by version or by hardware since the original server was apparently SATA or SCSI and you're now working with IDE. Use udev 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:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.