Novell Home

Creating NSS Volumes on OES 2 using Distributed Replicated Block Device

Novell Cool Solutions: Feature
By Sakila Ravi

Digg This - Slashdot This

Posted: 1 Nov 2007
 

Table of contents

  1. Introduction
  2. Configuring DRBD
  3. Creating NSS pools and volumes

Introduction

Distributed Replicated Block Device is a Linux kernel module, that, working together with user space management applications and some scripts, offers a distributed storage system.

DRBD refers to both the software (kernel module and associated user space tools), and also to specific logical block devices managed by the software.

This document explains how to configure DRBD to create NSS pools and volumes on a single hard disk machine on SLES 10 SP1 OES 2, if we have n't created EVMS Partitions at the time of installation of SLES 10 SP1 OES 2.

Configuring DRBD

  1. Select and install the two drbd packages "drbd and drbd-kmp-default" from yast2 , after the install it pops up with "Reboot the system to activate the new kernel" click OK and reboot the system into SLES 10 SP1 OES 2

  2. After Installation of DRBD packages, Create a LVMLinux partition from yast2-> system->partitioner of as much as size for NSS.

  3. Create logical volume using the following commands or from yast2.

    • Initialize a disk or partition for use by LVM

      # pvcreate <lvm device which has been created in step2> 
          eg: pvcreate /dev/hda3
    • Create a volume group
      # vgcreate <volume group name> <lvm device which has been created in step2> 
          eg: vgcreate vg1 /dev/hda3
    • Create a logical volume in an existing volume group
      # lvcreate -L <lvm device size> -n <logical volume name>  <volume group name> 
          eg: lvcreate -L 5GB -n lv1 vg1

  4. Copy the drbd.conf file from /usr/share/doc/packages/drbd/drbd.conf to /etc/

    Open the drbd.conf from /etc and edit the conf file by replacing the parameters of amd device in resource r0 into this:
    		
    		on <hostname of the machine> {
    		  device     /dev/drbd0;
    		disk      <device name of your drbd disk, eg: /dev/vg1/lv1>;
    		address    <ip address of the machine>:7788;
    		meta-disk  internal;
    		   }
    		on alf {
    		  device    /dev/drbd0;
    		disk      /dev/hdc5;
    		address   192.168.22.12:7788;
    		meta-disk internal;
    		   }
    		}
    		
    			
    These parameters are required to run DRBD,
    The second device alf should not be modified and after this do skip or comment the rest of the lines(resource r1 to r3)

  5. Bring up DRBD by giving the command rcdrbd start say 'yes' when it ask "To abort waiting enter 'yes' [ 12]"
     # rcdrbd start

  6. This command reads its configuration file and switch all configured resources to primary state.
    # drbdadm -- --do-what-I-say primary all
    After executing the above commands drbd0 will get created by default under nssmu-> devices

Creating NSS Pools and Volumes

Goto nssmu

  • Initialize the drbd0 in devices
  • Create pools on drbd0 and create some volumes on top of the pool

When ever the machine is rebooted, the following commands needs to be executed to access the NSS volumes

    rcdrbd start
    drbdadm -- --do-what-I-say primary all
    rcnovell-nss start


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell