Archive for the ‘Ubuntu’ Category

Redundant iSCSI storage for Linux

Wednesday, June 10th, 2009

Here’s how to set up relatively cheap redundant iSCSI storage on Linux. The redundancy is achieved using LVM mirroring, and the storage servers consist of commodity hardware, running the OpenFiler Linux distribution, which expose their disks to the clients using iSCSI over Ethernet. The servers are completely separate entities, and the purpose of this mirroring is to keep the logical volumes available, even while one of the storage servers is down for maintenance or due to hardware failure.

Ultimately the disks of the iSCSI target servers will show up as normal SCSI disks on the client (/dev/sdb, /dev/sdc, …). The data will be moved across the network transparently. It is preferable to use multiple gigabit network interface cards on both the initiator and the target, and bond them together for reliability and speed gain (or use Device Mapper Multipath). A separate VLAN for iSCSI traffic is recommended for security and speed. By default, the traffic is not encrypted so your disk blocks can easily be sniffed using tcpdump.

(more…)

OpenSSH public key authentication

Friday, January 9th, 2009

First, create a key-pair with ssh-keygen. This is a one-time operation.

ssh-keygen -t dsa

It is good practice to enter a good password, but you may also leave the password empty. That will leave your private key vulnerable to local attacks, but if you need to login somewhere from a cron job, you probably need to do that.

(more…)

Ubuntu 8.10 on Thinkpad X300

Monday, December 8th, 2008

I upgraded my Lenovo Thinkpad X300 to Ubuntu 8.10 Intrepid Ibex today. My original installation notes for Hardy are here.

After the upgrade, sound was working without compiling an ALSA snapshot by hand. Also, 3G connections worked straight out of the NetworkManager applet, which is very nice. But WiFi was broken, as the nm-applet refused to connect to any SSID, encrypted or open. That seemed to be due to myself using the development networkmanager packages with Hardy. They were not upgraded correctly. The remedy was to remove all network-manager packages and reinstall them. (more…)

NIC bonding with Ubuntu

Saturday, August 2nd, 2008

Network interfaces can be bonded to provide fault-tolerant operation. Here’s how to do it in Ubuntu. I will assume the interfaces to be bonded are eth0 and eth1.

(more…)

Lenovo ThinkPad X300 Ubuntu 8.04 Installation Notes

Thursday, June 5th, 2008

First, let me tell you some first impressions about the machine. The keyboard is very good. It feels even a bit better than the one in my old T60. The display is very bright and sharp, but viewing angles could be better. WLAN worked right out of the box, as did the webcam.

The solid state drive is incredibly fast. I will never switch back to a hard disk after experiencing an SSD. Everything loads up in an instance. OpenOffice starts in about 5 seconds, which is very good compared to my T60. And the machine boots up and shuts down really fast (I haven’t timed those operations, though).

There are also a couple of annoyances which I hope will soon be fixed. (more…)

Limiting the bandwidth of incoming traffic

Wednesday, April 23rd, 2008

A backup server was saturating the DSL links of remote offices every time the backups were running. To prevent this, I had to limit the incoming bandwidth of the TCP-connections that were used to back up the remote hosts, but not touch the ones that were used to connect to the servers in the local network. Here’s how to do it.

(more…)

Scratchbox installation under 32-bit chroot on 64-bit Ubuntu

Saturday, January 5th, 2008

I wanted to try out the Maemo SDK for Nokia 770, N800 and N810 devices (for some reason I happen to own one of every generation), but found out that there are no prebuilt packages for the 64-bit environment. The quick (?) remedy for this is the chroot jail, because a guest i386 environment can pretty easily be bootstrapped inside a 64-bit one. Here are the step-by-step instructions for doing it.

(more…)

Bootstrapping an Ubuntu guest for Xen

Wednesday, October 24th, 2007

First, some empty disk space is needed. Let’s create a logical volume for our new virtual machine:

root@xenserver1:~# lvcreate -n testlv -L 10G vg0
  Logical volume “testlv” created

Create a filesystem on the new logical volume:

(more…)

How to get VMware Server working with an unsupported kernel and the vmware-any-any patch

Wednesday, October 17th, 2007

VMware Server needs exactly two kernel modules running on the host system (there are separate modules for guest systems). These are the vmmon and the vmnet modules. Unfortunately, the vmmon and vmnet packages included in the VMware server distribution package don’t compile with the newest kernels. When I upgraded my laptop to Gutsy Gibbon a few weeks ago, I forgot to check if VMware server supports the new kernel. And, of course, it doesn’t yet. But luckily I found the vmware-any-any package, a patched version of the host kernel modules that works with newer kernel versions.

(more…)

Updated version of the flash64.sh script for Ubuntu 7.10 Gutsy Gibbon

Tuesday, October 2nd, 2007

A few months ago I released a script to install a 32-bit Adobe Flash plugin to a 64-bit Firefox, but it doesn’t seem to work in Gutsy beta. Here’s an updated one. I upgraded my laptop to Gutsy and used this one to get Flash working.

Edit: I did a complete reinstall later and learned that Gutsy knows how to set this up by itself. So there’s no need for this script anymore. And that is a very positive thing!

(more…)