Partitioning

Labels in SL5, the part kickstart command takes the --label option, but this isn't available in SL4. In both versions, the installer adds labels to filesystems (and swap) that are on regular partitions, but not on RAID or LVM partitions.

For systems with a single disk, layout is:

Partition Mount point Size
sda1 /boot 100M
sda2 swap 4G
sda3 / 15GB
sda4 /scratch rest of disk

Swap should be a 4GB on new installs. For quad core systems use 2GB per core. Use labels for mounting filesystems including swap.

For systems with 2 drives, can create a RAID1 /work area, scratch dir will be made within work (symlink):

Partition RAID device Mount point Size
sda1,sdb1 md0 /boot 100M
sda2,sdb2 none swap 2G
sda3,sdb3 md1 / 15GB
sda4,sdb4 md2 /work rest of disk

This system ends up with 2 swap partitions. Don't know about using labels with basic Linux software RAID, so just using device names (swap still using labels).

LVM is avoided on desktop systems --- left to servers and such where filesystem resizing is helpful.

Installs with RAID1

For installs, the above partitioning is setup using fdisk in a %pre section. Doing this "manually" ensures that the partitions are laid out exactly as desired (per above). Note that the input to fdisk is pretty picky... On single disk systems, the type settings aren't needed, but can be left in with "fd" changed to "83".

# for RAID setup
# wipe and set partitions on sda
dd if=/dev/zero of=/dev/sda bs=512 count=40
fdisk /dev/sda << ENDFDISK
n
p
1

+100M
t
fd
n
p
2

+2000M
t
2
82
n
p
3

+15000M
t
3
fd
n
p
4


t
4
fd
p
w
ENDFDISK

The partitioning info looks like:

#Disk partitioning information
part swap --onpart sda2
part swap --onpart sdb2

part raid.11 --onpart sda1
part raid.13 --onpart sda3
part raid.14 --onpart sda4
part raid.21 --onpart sdb1
part raid.23 --onpart sdb3
part raid.24 --onpart sdb4

raid /boot --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21
raid / --fstype ext3 --device md1 --level=RAID1 raid.13 raid.23
raid /mnt/exports/work -device md2 --fstype ext3 --level=RAID1 raid.14 raid.24

The /etc/fstab ends up like this (on SL4):

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/md1                /                       ext3    defaults        1 1
/dev/md0                /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/md2                /mnt/exports/work       ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-sdb2         swap                    swap    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/dev/scd0               /media/cdrecorder       auto    pamconsole,exec,noauto,managed 0 0

Reinstalls of RAID1

Note, the reinstall is risky if you wish to preserve data! Just picking the wrong install type from the grub menu will probably cause data loss (if you do this, shutdown computer to kill the installer before it writes to the drive...).

For reinstalls, remove the partitioning in %pre, all the partitioning info, and use interactive mode to manually specify the partitions to reformat.

Installs on single disk

The %pre is similar, but don't set partition types to "fd". Change the swap partition size if needed.

part /boot --fstype ext3 --onpart sda1
part swap --fstype swap --onpart sda2 
part / --fstype ext3 --onpart sda3
part /scratch --fstype ext3 --onpart sda4

-- TomRockwell - 28 Apr 2009
Topic revision: r3 - 29 Apr 2009, TomRockwell
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback