LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   CentOS 6.3 x64 - cannot create a second size-identical partition (fdisk) (https://www.linuxquestions.org/questions/linux-general-1/centos-6-3-x64-cannot-create-a-second-size-identical-partition-fdisk-4175442722/)

da1 12-23-2012 04:39 PM

CentOS 6.3 x64 - cannot create a second size-identical partition (fdisk)
 
Hi guys,

The box is a P4, 3GHz CPU, with 2x WD 80GB S-ATA identical disks. The OS was installed during a time when there was only 1x disk available and now, having inserted a 2nd HDD, I want to migrate to a mirrored setup. The current installation has a /boot partition and the rest is LVM based.

The problem is that if I want to create a /boot partition on the second disk that is identical to the /boot partition from the first one (same Start cylinder and End cylinder), I do not get the same Blocks on the second disk.

First disk:
Code:

[root@test ~]# fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b4ee9

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          64      512000  83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        9726    77611008  8e  Linux LVM

Second disk:
Code:

Command (m for help): n
Command action
  e  extended
  p  primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-9726, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-9726, default 9726): 64

Command (m for help): p

Disk /dev/sdb: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x90909090

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1          64      514048+  83  Linux

Having this problem, the raid1 for the /boot partition will not work.

I also tried setting the End cylinder to 63 but that didn't work either.

Any suggestions?

da1 12-23-2012 06:16 PM

Solved by using the "-u" flag for fdisk.


All times are GMT -5. The time now is 02:54 PM.