Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
use gdisk, please. –  mikeserv Apr 14 at 2:57
1  
@mikeserv Why do you think that the new server uses GPT partitioning? –  Gilles Apr 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 at 22:14
1  
@Tensigh unix.stackexchange.com/questions/121865/… –  Gilles Apr 16 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 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.