DRBD installation from source

backup and filesystems Add comments

Prepare kernel source
cd /usr/src/linux
make mrproper
cp /boot/config-2.4.some-thing .config

Edit the Makefile to make sure the EXTRAVERSIONS constant reflects the stock kernel naming
vi Makefile

Now prepare the kernel sources to be ready for compiling modules against it
make -s oldconfig_nonint ; make -s oldconfig_nonint
make dep
make include/linux/version.h

Compile DRBD
wget http://oss.linbit.com/drbd/0.7/drbd-0.7.10.tar.gz
tar xfz drbd-0.7.10.tar.gz
cd drbd-0.7.10
make all
make install

Probably the devide nodes were not setup so far. We have to do this as well
for i in `seq 0 15` ; do mknod -m 0660 /dev/drbd$i b 147 $i; done

Setup first node with a new partition
/etc/init.d/drbd start
drbdadm up all
drbdadm -- --do-what-I-say primary all
mke2fs /dev/drbd0
tune2fs -j /dev/drbd0

Automatically start DRBD partition on bootup
ln -s /etc/init.d/drbd /etc/rc3.d/S29drbd
ln -s /etc/init.d/drbd /etc/rc3.d/K29drbd
vi /etc/fstab -> /dev/drbd0 /ha ext3 defaults 0 0

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in