Posts

Showing posts with the label CentOS

CentOS 5.1 with Xen Virtualization

At a start, install CentOS minimal installation Update OS using yum yum -y update Install NTP for time sync (Xen HOST only) yum -y install ntp sed -i -e 's/^restrict -6/#restrict -6/' /etc/ntp.conf ntpdate pool.ntp.org hwclock --systohc /etc/rc.d/init.d/ntpd start chkconfig ntpd on Reboot with lastest patches reboot Install Xen and Xen Kernel yum -y install xen kernel-xen Enable booting Xen Kernel sed -i -e 's/^default=1/default=0/' /boot/grub/grub.conf Reboot for new XEN kernel reboot Commands for LVM creation pvcreate /dev/sdax vgcreate vg0 /dev/sdax lvcreate -n vm01 --size 6g vg0 lvcreate -n vm02 --size 6g vg0 Sample config for VM01 to be save to: /etc/xen/vm01 name = "vm01" disk = [ "phy:/dev/vg0/vm01,xvda,w" ] maxmem = 512 memory = 512 vcpus = 2 bootloader = "/usr/bin/pygrub" vif = [ "bridge=xenbr0" ] Populate the Xen VM partition with minimal OS fdisk /dev/vg0/vm01 kpartx -v -a /dev/vg0/...

DRBD setup

In this lab, we try to achieve network disk mirroring with DRBD software Version – drbd-8.0.6 OS – CentOS 4.5 Build drbd RPMs from source tarball cd /usr/src tar zxvf drbd-8.0.6.tar.gz cd drbd-8.0.6 make rpm RPM installation cd dist/RPMS/i386/ rpm -ivh drbd-8.0.6-3.i386.rpm rpm -ivh drbd-debuginfo-8.0.6-3.i386.rpm rpm -ivh drbd-km-2.6.9_55.EL-8.0.6-3.i386.rpm Edit /etc/drbd.conf resource "share1" { protocol C; startup { wfc-timeout 0; ## Infinite! degr-wfc-timeout 60; ## 2 minutes. } disk { on-io-error detach; } net { } syncer { } on box1.lan { device /dev/drbd0; disk /dev/sdd1; address 192.168.91.2:7789; meta-disk /dev/sdf1[0]; #meta-disk internal; } on box2.lan { device /dev/drbd0; disk /dev/sdd1; address 192.168.91.3:7789; meta-disk /dev/sdf1[0]; #meta-disk internal; } } resource "share2" { protocol C; startup { wfc-timeout 0; ## Infinite! degr-wfc-timeout 60; ## 2 minutes. } disk { on-io-error detach; } net { } syncer { } on box1...