Personal tools
You are here: Home Members marc blog Blog on OCFS2 OSR on OCFS2 Build OSR
Document Actions

Build OSR

Build the cluster

Prerequisites

see below

Create the shared root filesystem

The shared root filesystem must be a logical volume on a shared storage device. Use gfs_mkfs to create the GFS filesystem:

    mkfs.ocfs2 -Losr /dev/xvdc

Mount the new filesystem to '/mnt/newroot':

    mount /dev/xvdc /mnt/newroot/  

Copy all data from the local installed RHEL5 root filesystem to the shared root filesystem:

    cp -ax / /mnt/newroot/

Create some directories:

    mkdir /mnt/newroot/proc
    mkdir /mnt/newroot/sys

Create a new cdsl infrastructure on the shared root filesystem:

    com-mkcdslinfrastructure -r /mnt/newroot -i

Mount the local cdsl infrastructure:

    mount --bind /mnt/newroot/cluster/cdsl/1/ /mnt/newroot/cdsl.local/

Make /var hostdependent:

    com-mkcdsl -r /mnt/newroot -a /var 

Make /var/lib shared again:

    com-mkcdsl -r /mnt/newroot -s /var/lib

Make /etc/sysconfig/network hostdependent:

    com-mkcdsl -r /mnt/newroot -a /etc/sysconfig/network

Create /etc/mtab link to '/proc/mounts':

    cd /mnt/newroot/etc/
    rm -f mtab
    ln -s /proc/mounts mtab

Remove cluster network configuration:

    rm -f /mnt/newroot/etc/sysconfig/network-scripts/ifcfg-eth0

Disable kudzu:

    chroot /mnt/newroot/ chkconfig kudzu --del

Modify '/mnt/newroot/etc/fstab':

    #/dev/vg_clurhel5_sr/lv_sharedroot  /           gfs     defaults        0 0
    #LABEL=/boot             /boot                   ext3    defaults        1 2
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    tmpfs                   /dev/shm                tmpfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
   sysfs                   /sys                    sysfs   defaults        0 0
   /dev/vg_system/lv_swap  swap                    swap    defaults        0 0

Create shared bootdevice

Mount shared boot:

    mount /dev/xvdb1 /mnt/newroot/boot/

Copy boot:

    cp -a /boot/* /mnt/newroot/boot

create '/mnt/newroot/boot/grub/grub.conf':

    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.el5xen ro root=/dev/xvdb console=xvc0
        initrd /initrd-2.6.18-92.el5xen.img
    title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.el5xen ro root=/dev/xvdb console=xvc0
        initrd /initrd-2.6.18-53.el5xen.img

Invoke grub shell:

    grub

Install grub:

    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]

    grub> device (hd0) /dev/xvdb

    grub> root (hd0,0)
     Filesystem type is ext2fs, partition type 0x83

    grub> setup (hd0)
     Checking if "/boot/grub/stage1" exists... no
     Checking if "/grub/stage1" exists... yes
     Checking if "/grub/stage2" exists... yes
     Checking if "/grub/e2fs_stage1_5" exists... yes
     Running "embed /grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
    succeeded
     Running "install /grub/stage1 (hd0) (hd0)1+15 p     (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
    Done.

Create Shared Root initrd

Create ocfs2-tools depfile /etc/comoonics/bootimage/rpms.initrd.d/ocfs2.list:

     [root@vgenerix5 ~]# cat /etc/comoonics/bootimage/rpms.initrd.d/ocfs2.list
     ocfs2-tools

Create the shared root initrd into the shared boot filesystem:

    /opt/atix/comoonics-bootimage/mkinitrd -f /mnt/newroot/boot/initrd-$(uname -r).img $(uname -r)

Boot Cluster

Have Fun !!

Blog on OCFS2
« May 2012 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Blog on OCFS2:
More...
Categories:
OCFS2 (0)
OCFS2 Sharedroot (0)
Shared (0)
root (0)
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: