Background:
KickstartServer:
OS:
# cat /etc/redhat-release
CentOS release 6.2 (Final)
# uname -a
Linux unattended.localdomain 2.6.32-220.2.1.el6.x86_64 #1 SMP Fri Dec 23 02:21:33 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
Issue:
Using kickstart to provision a CentOS 6.x server with RAID1 yields in correct partitioning scheme. More specifically, kick-start doesn't partition the disk in the order in which i need it to.
The standard I'm following is to have the following partitions in this specific order and size:
/boot = 200MB
swap = 8192MB
/ = the rest of the drive
So the first sector of the disks should be associated with "/boot". What Kick-start is doing is placing swap first, then "/boot" then "/", which then in turn forces the boot flag to move to the section partition on the physical disk
Also, this also throws off what "md" device the partitions are associated with...for example:
What it should look like:
md0 = /boot = sda1 / sdb1
md1 = swap = sda2 / sdb2
md2 = / = sda3 / sdb3
But Kickstart is causing this:
md0 = swap = sda2 / sdb2
md1 = /boot = sda1 / sdb1
md2 = / = sda3 / sdb3
Code:
# fdisk -l
Disk /dev/sda: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 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: 0x00071bb1
Device Boot Start End Blocks Id System
/dev/sda1 1 1045 8388608 fd Linux raid autodetect
/dev/sda2 * 1045 1070 204800 fd Linux raid autodetect
/dev/sda3 1070 9730 69555200 fd Linux raid autodetect
Disk /dev/sdb: 80.0 GB, 80025280000 bytes
255 heads, 63 sectors/track, 9729 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: 0x000ecc13
Device Boot Start End Blocks Id System
/dev/sdb1 1 1045 8388608 fd Linux raid autodetect
/dev/sdb2 * 1045 1070 204800 fd Linux raid autodetect
/dev/sdb3 1070 9730 69555200 fd Linux raid autodetect
Unfortunately the kick-start config file doesn't seem to taken explicitly. In other-words, moving the order of operation in which the partitions are created in the config file, has no impact on how anaconda actually partitions in actual deployment.
Below is my config file for partitioning
Code:
# /boot
part raid.00 --ondrive=sda --asprimary --size=200
part raid.01 --ondrive=sdb --asprimary --size=200
# swap
part raid.10 --ondrive=sda --asprimary --size=8192
part raid.11 --ondrive=sdb --asprimary --size=8192
# /
part raid.20 --ondrive=sda --asprimary --size=1 --grow
part raid.21 --ondrive=sdb --asprimary --size=1 --grow
# Create mount pts and Associate partitions with MD devices
raid /boot --fstype=ext4 --level=1 --device=md0 raid.00 raid.01
raid swap --fstype=swap --level=1 --device=md1 raid.10 raid.11
raid / --fstype=ext4 --level=1 --device=md2 raid.20 raid.21
Can anyone shed some light on this? Or how to order the partitions properly? Provisioning CentOS 5.x servers works just fine it's the CentOS 6.x servers that have partitioning issues.
I've even tried the --start --end flags to define where partitions start and end, but this is no longer supported in kickstarted CentOS 6.x, and only works when kick-starting a CentOS 5. series server.
Any help will be greatly appreciated.