Difference between revisions of "Xen on CentOS 5"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 22: Line 22:
 
To have the possibility to reinstall the dom0 with the fabric management tool (uses pxeboot/kickstart) we postprocess the ks file after first installation. See appendix (ks2reinst.sh).
 
To have the possibility to reinstall the dom0 with the fabric management tool (uses pxeboot/kickstart) we postprocess the ks file after first installation. See appendix (ks2reinst.sh).
  
  clearpart --all --initlabel
+
clearpart --all --initlabel
 
  part raid.01 --size=512  --ondisk=sda --asprimary
 
  part raid.01 --size=512  --ondisk=sda --asprimary
 
  part raid.02 --size=8192 --ondisk=sda --asprimary
 
  part raid.02 --size=8192 --ondisk=sda --asprimary
Line 41: Line 41:
 
  logvol /var --fstype=ext3      --vgname=systemvg      --size=4096    --name=sysvar
 
  logvol /var --fstype=ext3      --vgname=systemvg      --size=4096    --name=sysvar
 
  logvol /var/lib/xen/save --fstype=ext3      --vgname=systemvg      --size=10240    --name=sysxensave
 
  logvol /var/lib/xen/save --fstype=ext3      --vgname=systemvg      --size=10240    --name=sysxensave
 +
 +
=== Filesystem layout Harware-RAID-10 ===
 +
Here the disks appear as one and the respective section in the kickstart file gets a lot simpler:
 +
 +
clearpart --all --initlabel
 +
part /boot --size=256 --asprimary --fstype=ext2 --ondisk=sda
 +
part / --size=12288 --asprimary --fstype=ext3 --ondisk=sda
 +
part swap --size=8192 --asprimary --fstype=swap --ondisk=sda
 +
part pv.01 --size=1 --grow --ondisk=sda
 +
volgroup system pv.01
 +
logvol /var --fstype ext3 --size=8192    --name=var  --vgname=system
 +
logvol /tmp --fstype ext3 --size=8192    --name=tmp  --vgname=system
  
 
= Xen dom-0 Configuration =
 
= Xen dom-0 Configuration =

Revision as of 15:12, 15 October 2008

Centos-5.2-x86_64 xen-dom0 Installation

  • Hardware: Dell PE-1950, HD: 2X500G Soft-RAID-1, PE-2950, HD: 4X500G Hardware-RAID-1-0.
  • Network: 2 Interfaces, only one cabled

Installation of Dom-0

Dom0 (Host) needs < 10G for its system, tmp is not extensively used nor is var. To prevent the system to be unresponsive due to full / fs we could give 4GB /tmp and /var each. These values can be smaller if we have hardware which has some disk space restrictions.

Depending on the hardware we have to set up a RAID-1 (2 disks) or we treat the (4-disks) hardware RAID-1-0 as one disk within the kickstart file.

Filesystem layout Soft-RAID-1

Principle layout:

  • RAID-1
  • Primary Partitions
/boot 512MB
/swap 4096MB
  • LVM
Volumegroup System, Size: rest of available space
I System-Volumes-Dom0 [/, /tmp] fs: ext3
II DomU-lvms added when needed


To have the possibility to reinstall the dom0 with the fabric management tool (uses pxeboot/kickstart) we postprocess the ks file after first installation. See appendix (ks2reinst.sh).

clearpart --all --initlabel
part raid.01 --size=512   --ondisk=sda --asprimary
part raid.02 --size=8192 --ondisk=sda --asprimary
part raid.03 --size=24576  --ondisk=sda
part raid.04 --size=1 --ondisk=sda --grow
part raid.11 --size=512   --ondisk=sdb --asprimary
part raid.12 --size=8192 --ondisk=sdb --asprimary
part raid.13 --size=24576  --ondisk=sdb
part raid.14 --size=1 --ondisk=sdb --grow
raid /boot     --level=RAID1 --device=md0 --fstype=ext2 raid.01 raid.11
raid /         --level=RAID1 --device=md1 --fstype=ext3 raid.02 raid.12
raid pv.01 --fstype "physical volume (LVM)" --level=RAID1 --device=md2 raid.03 raid.13
raid pv.02 --fstype "physical volume (LVM)" --level=RAID1 --device=md3 raid.04 raid.14
volgroup systemvg       pv.01
volgroup xenvg          pv.02
logvol swap --fstype=swap       --vgname=systemvg       --size=2048     --name=sysswap
logvol /tmp --fstype=ext3       --vgname=systemvg       --size=4096     --name=systmp
logvol /var --fstype=ext3       --vgname=systemvg       --size=4096     --name=sysvar
logvol /var/lib/xen/save --fstype=ext3       --vgname=systemvg       --size=10240     --name=sysxensave

Filesystem layout Harware-RAID-10

Here the disks appear as one and the respective section in the kickstart file gets a lot simpler:

clearpart --all --initlabel
part /boot --size=256 --asprimary --fstype=ext2 --ondisk=sda
part / --size=12288 --asprimary --fstype=ext3 --ondisk=sda
part swap --size=8192 --asprimary --fstype=swap --ondisk=sda
part pv.01 --size=1 --grow --ondisk=sda
volgroup system pv.01
logvol /var --fstype ext3 --size=8192     --name=var  --vgname=system
logvol /tmp --fstype ext3 --size=8192     --name=tmp  --vgname=system

Xen dom-0 Configuration

Dom0 grub

For performance its best to limit the Memory of the dom0 to 512 MB and to prevent it from ballooning (i.e.dom-0 takes all available memory), and to restrict the dom0 to one cpu. Use some monitoring to make sure that these settings are sufficient.

Therefore modify /boot/grub/menu.lst, the important entries are in bold: title CentOS (2.*xen)

       root (hd0,0)
       kernel /xen.gz-2.6.18-92.1.6.el5 dom0_mem=512M
       module /vmlinuz-2.6.18-92.1.6.el5xen ro root=/dev/systemvg/sysroot nosmp
       module /initrd-2.6.18-92.1.6.el5xen.img

xend configuration

Set in /etc/xen/xend-config.sxp:

(dom0-min-mem 0)