RAID 1 kickstart, partial solution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have come up with a partial solution for getting kickstart to install 
RH on software raid 1, mirroring bopth complete disks(ks.cfg file 
below). This includes swap, /, /boot, etc, with /boot at the beggining 
of the disk on the primary partition. 

The problem I'm having now, is these are Dell servers, that have a 
small fat 16(actually they don't call it type 6, but ussually de or 
some other unknown partition type) on begining of the first disk that 
contains some dos diagnosis utility. This partition has ranged in size 
between 1-6 cylinders. I would like to try and keep this utility on 
both disks because <rant> from my understanding, Dell almost refuses to 
accept any bad hardware unless you run their dos utility</rant>. (this 
was said knowing Dell employess are on this list and may someday get 
rid of this drackoian policy). Back to the subject matter:

Does/Would anyone have any ideas on how I could extract this 
information, then pass it onto fdisk to recreate that partition on the 
second disk?

TIA

Steve

ps, people I bcc, since you where having problems with the same thing 
(mirroring complete disks, /boot on primary), I thought this might be 
usefull to you.
________________________
>>cat ks.cfg

lang en_US

cdrom

device ethernet eepro100

keyboard "us"

zerombr yes
clearpart --linux

# creating the partitions

# To force/coererce/trick kickstart to put /boot on the
# begining of the disk (ie primary), we have to somehow
# make anaconda think it's the largest partition

# /boot partitions
part raid.01 --size 50 --ondisk sda
part raid.02 --size 50 --ondisk sdb

# / partitions
part raid.11 --size 6 --grow --maxsize 400 --ondisk sda
part raid.12 --size 6 --grow --maxsize 400 --ondisk sdb

# swap partitions
part raid.21 --size 5 --grow --maxsize 250 --ondisk sda
part raid.22 --size 5 --grow --maxsize 250 --ondisk sdb

# /var partition
part raid.31 --size 4 --grow --maxsize 200 --ondisk sda
part raid.32 --size 4 --grow --maxsize 200 --ondisk sdb

# /tmp partition
part raid.41 --size 3 --grow --maxsize 1000 --ondisk sda
part raid.42 --size 3 --grow --maxsize 1000 --ondisk sdb

# /usr partition
part raid.51 --size 2 --grow --maxsize 2500 --ondisk sda
part raid.52 --size 2 --grow --maxsize 2500 --ondisk sdb

# /home partition, fill the rest of disk
# even if you want the last partition to fill the rest of the
# disk, you still need to do a --maxsize (needs to be bigger
# than what is actually left) because it won't use up the
# whole disk
part raid.61 --size 1 --grow --maxsize 4800 --ondisk sda
part raid.62 --size 1 --grow --maxsize 4800 --ondisk sdb


# defining raid
# all raid level 1
raid /boot --level 1 --device md0 raid.01 raid.02
raid / --level 1 --device md1 raid.11 raid.12

# since we can't add a swap device, we'll do it later read
# coments below on not having swap initially in post section
# raid <swap> --level 1 --device md2 raid.21 raid.22
raid /var --level 1 --device md3 raid.31 raid.32
raid /tmp --level 1 --device md4 raid.41 raid.42
raid /usr --level 1 --device md5 raid.51 raid.52
raid /home --level 1 --device md6 raid.61 raid.62


install

mouse genericps/2 --emulthree

timezone America/Los_Angles

xconfig --server "Mach64" --monitor "generic monitor that can do 
1280x1024 @ 60 hz"

rootpw ********

auth --useshadow

lilo --location mbr --linear

%packages
@ Everything
# we'll, not really everything, just for simpliety we say it

%post

# first we are going to get swap working on the next bootup

# WARNING, I currently use this with a 2.2 kernel w/ 256 megs
# of ram, I don't know how this would fare with the 2.4 kernel
# (it's suppose to need swap, no mater the ram size) or less ram
# ymmv

# this modifies the fstab, so swap starts at next bootup
echo "/dev/md2                swap                    swap    
defaults        0 0
" >> /etc/fstab

# this adds the raidev for swap in the raidtab
echo "raiddev		    /dev/md2
raid-level		    1
nr-raid-disks		    2
chunk-size		    64k
persistent-superblock	    1
#nr-spare-disks	    0
    device	    /dev/sda6
    raid-disk     0
    device	    /dev/sdb6
    raid-disk     1
" >> /etc/raidtab


# this copies over the first primary partition(Dell dos
# "idiotic" hw check utility)to the second
/bin/dd if=/dev/sda1 of=/dev/sdb1

# copies a lilo.conf file from the floppy, so lilo now
# know about both Dell dos "idiotic" hw check utility
mount -t vfat /dev/fd0 /mnt/floppy
cp -f /mnt/floppy/lilo.conf /etc/lilo.conf
/sbin/lilo
umount /mnt/floppy

# after reboot, swap is initalized and working. Still would like to 
# get / on primary partition, but this would have to do for now





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux