Sunday, December 20, 2009

A wireless bridge using Dlink DWL-2100APs

This doesn't seem to be well documented - I had to do this at home to connect two parts of my home network together.

A bridge connects two parts of the same network together. The ends of the bridge are symmetric, and configured similarly.

You need two Dlink DWL-2100 APs. Put them both into WDS mode (in the wireless config). Put the mac address of the other one in each (obviously, this scales to multiple APs). Set up the same encryption key on each. Plug each one into the cabled ethernet in that part of the network, and restart. You then have one large network made up of the two previous fragments.


That's it!

Friday, December 11, 2009

drbd

drbd sounds like an interesting technology. Essentially, it's RAID 1 over a network. Using it, you can construct two disks which are kept in sync with drbd. Doesn't matter whether the disks are, themselves, RAID.

drbd operates by providing a virtual disk, upon which your filing system mounts. So, instead of mounting at /dev/sda1, for example, you'd enable drbd on /dev/sda1 and then mount your real filing system on /dev/drbd0

Once up and running, it maintains a status in /proc/drbd. Querying this just tells you whether you are on the primary, and whether the two drives are in sync.

When I built a pair (4TB) the biggest issue was formatting. You only format the primary, of course, and the secondary formats by syncing. Syncing 4TB of data takes a long, long time....

BUT - you can't mount the secondary. So you can't use drbd to maintain an identical pair of servers with one of the read only. The second server, the secondary, is missing a mount

Of course, this is used with heartbeat to provide a ha pair with automatic failover.

This all worked really well for me, until d-day. for some unexplained reason, drbd refused to start when the servers were rebooted to go live. I had to strip it off, and that's the end of this particular experiment.

Wednesday, December 09, 2009

The delights of Karmic Koala

I've just had a nightmare. A large server, built using the server edition of Ubuntu 9.10, out of the box. Actually, I built two, using drbd and heartbeat. They worked nicely on the bench - did an apt-get update/upgrade, shut them down, mounted them in the rack --- and drbd refused to start. Probably something in the upgrade.


Anyway, to cut a long story short, removed drbd, down to one server. Well, ok...except that samba didn't work. The server could be connected to by IP address, but it never managed to get it's name in the WINS server we use.

After a lot of fiddling, I upgraded from 3.4.0 (the 9.10 version) to 3.4.3, building it from scratch, following Jeremy's excellent notes on

http://www.jeremycole.com/blog/2009/12/01/upgrade-samba-3-0-28a-to-3-4-3-on-ubuntu-8-04-lts/

My first stab at this worked perfectly, and is now in heavy use.

I then repeated the procedure on the identical twin machine. This builds without error, and installs without error. It even starts without error. But no-one can connect to it.

The samba log file just shows

smbd_open_once_socket: open_socket_in: Address already in use

There are a number of blog posts mentioning this problem in conjunction with upgrades on 9.10

I purged the install, removing all the config and .TDB files. Exactly the same, Built it with and without LDAP.

If anyone has any inklings on this I would be very interested. My faith in the quality control here is lower than it was...