FirstServed Tech Blog - FirstServed and the Art of Server Tuning

Archive for February, 2009

XenServer and DRBD

Friday, February 27th, 2009

While XenServer and DRBD do play together nicely in various setups, problems can be encountered when using a setup similar to this:
 

sda3 -> LVM -> DRBD -> LVM -> LVM

This occured in a complex XenServer setup we were building.
When booting the (paravirtualised) guest we saw this message in the systems log:

kernel: drbd6: bio would need to, but cannot, be split: (vcnt=4,idx=0,size=4096,sector=4423615)

Simultaniously the guest would complain about unreadable sectors on the drive.

The issue is actually rather simple, and documented on the internet.
But while some xensource users switch over to file-based VM’s as a work-around, this is not an option in XenServer.

So, how can this really be solved?
By simply adding an extra parameter to the drbd.conf: 

disk {
    max-bio-bvecs 1;
}

This simple switch effectively cures the whole situation.
If you want more information about this switch, please read the man files on drbd.conf

man drbd.conf

The switch and what it does is fairly well documented there.

Clearing local DNS cache

Wednesday, February 18th, 2009

When modifying DNS settings, a local DNS cache can be pretty annoying.
Often you’ll want to clear the local cache of your computer and get new records from your provider (which may speed up the process if the provider has already updated the DNS records).

This can be done with these commands:

Windows:

ipconfig /flushdns

Linux:

/etc/init.d/nscd restart

(or service nscd restart, or /etc/rc.d/init.d/nscd, depending on your distribution)

Mac OSX:

dscacheutil -flushcache

(or lookupd -flushcache for Tiger)

These commands should be entered in a terminal ("cmd.exe" for the Windows users).

FTP: 550 Cannot STOR.

Tuesday, February 10th, 2009

If your Windows FTP is working correctly, but some users are reporting "550 Cannot STOR." errors.
It may be a good idea to check your logs for the filenames they are using.

We encountered the same problem on one of our shared Windows servers.
The problem was an illegal filename.

The user was using a mac computer, which allows a filename to contain ":".
The ":" is an illegal character to Windows and will finally result in a "550 Cannot STOR." error.