High Available NFS using DRBD and Heartbeat

NFS is a widely used network filesystem protocol allowing the client to access files over the network as if they are locally stored. To avoid the NFS share to become a SPOF (Single Point Of Failure) you can create a high available NFS share using DRBD and Heartbeat.

First we install the necessary packages on two servers:

The Magic SysRequest key


Although very rare Linux might get stuck as well and won't respond to keystrokes or other user input. In the worst case there is a kernel crash, sometimes with a kernel crash dump on the console, probably caused by an unstable driver or hardware problems.
If you are lucky the system stucks but you are able to login from a remote machine by ssh. You can kill the process kill -9 ... or reboot the system shutdown -r now. Most of the times a jam is caused by one or more processes consuming too many resources. Symptoms are extreme high CPU usage, high load, high memory usage, a high queue of waiting processes etc. If there are no resources left the kernel might still be running but the system doesn't respond to keystrokes, CTRL+ALT+DEL won't help and login from an other system with ssh is also impossible, as there are no resources left to start a new shell.


X11 applications over SSH


An easy way to run your Linux X applications on your Windows desktop is to use the SSH X11Forwarding capability. If you enable X11Forwarding on the SSH server you will be able to display GUI applications, running on the server, on your Windows desktop. Edit /etc/ssh/sshd_config and change the line X11Forwarding no into:

X11Forwarding yes

On your Windows desktop you should have an ssh-client and a X-server. A good choice to install on your Windows machine would be CYGWIN. ( Download setup.exe and follow the setup instructions. To be able to use X11 over SSH you need to select openssh from the NET group, and xorg-server, xterm and X-start-menu-icons from the X11 group. After finishing the installation start the X-server on your windows machine. In the CYGWIN shell type:

export DISPLAY=:0.0
followed by
ssh -X yourusername
Now you can display your X applications on your Windows desktop. For example type
and the clock will be displayed on your desktop.

Correct way to disable init-scripts to start at boottime on Debian

In several articles and forums I see people telling the way of removing the init-script on a Debian system would be:
update-rc.d -f init-script-name remove
The more appropriate way is to disable the init-script from running at boottime:
update-rc.d init-script-name stop levels .
In this way you prevent that in case you upgrade the package a new init-script will be created with the defaults.
If the init-script is written with the defaults the init-script might start the process again at boot-up.
If you disabled the init-script from running at boottime the init-script would not be recreated or overwritten with the init-script in the update.
Page 2 of 2


You are here: Home Howtos and FAQs General